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