1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

removing Authorization header

This commit is contained in:
Michael Shanks 2020-05-18 11:53:04 +01:00
parent 37a46883e5
commit 52a3b4786f

View file

@ -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
}