removing Authorization header

This commit is contained in:
Michael Shanks 2020-05-18 11:53:04 +01:00
parent e0e983cec1
commit 1ba64e02fe
1 changed files with 1 additions and 8 deletions

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
}