removed basic auth for go live

This commit is contained in:
2022-01-26 10:37:38 +00:00
parent 505d722739
commit 28586675d3
+9 -9
View File
@@ -11,17 +11,17 @@ class MyDocument extends Document {
let useGATracking = false; let useGATracking = false;
//remove this block when not need after softlaunch //remove this block when not need after softlaunch
let hasBasicAuth = // let hasBasicAuth =
typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined"; // typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
console.log("hasbasicAuth:", hasBasicAuth); // console.log("hasbasicAuth:", hasBasicAuth);
if (ctx.req && ctx.res) { // if (ctx.req && ctx.res) {
hasBasicAuth && // hasBasicAuth &&
(await basicAuthMiddleware(ctx.req, ctx.res, { // (await basicAuthMiddleware(ctx.req, ctx.res, {
users: process.env.BASIC_AUTH_CREDENTIALS, // users: process.env.BASIC_AUTH_CREDENTIALS,
})); // }));
} // }
if (ctx.req && ctx.req.headers.cookie) { if (ctx.req && ctx.req.headers.cookie) {
typeof ctx.req.cookies.CookiePolicy != "undefined" typeof ctx.req.cookies.CookiePolicy != "undefined"