removing Authorization header
This commit is contained in:
parent
37a46883e5
commit
52a3b4786f
|
@ -3,14 +3,7 @@ const STATUS_CODES = require("../utilities/statusCodes")
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
|
|
||||||
module.exports = async (ctx, next) => {
|
module.exports = async (ctx, next) => {
|
||||||
const authHeader = ctx.get("Authorization")
|
if (ctx.path === "/_builder") {
|
||||||
|
|
||||||
if (
|
|
||||||
authHeader &&
|
|
||||||
authHeader.startsWith("Basic") &&
|
|
||||||
authHeader.split(" ")[1] === env.ADMIN_SECRET
|
|
||||||
) {
|
|
||||||
ctx.isAuthenticated = true
|
|
||||||
await next()
|
await next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue