removed credential request

This commit is contained in:
2021-11-23 20:20:43 +00:00
parent 35369ecfdc
commit c652998189
3 changed files with 47 additions and 44 deletions
+9 -9
View File
@@ -10,17 +10,17 @@ class MyDocument extends Document {
let useGATracking = false;
// remove this block when not need after softlaunch
let hasBasicAuth =
typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
// let hasBasicAuth =
// typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
console.log(hasBasicAuth);
// console.log(hasBasicAuth);
if (ctx.req && ctx.res) {
hasBasicAuth &&
(await basicAuthMiddleware(ctx.req, ctx.res, {
users: process.env.BASIC_AUTH_CREDENTIALS,
}));
}
// if (ctx.req && ctx.res) {
// hasBasicAuth &&
// (await basicAuthMiddleware(ctx.req, ctx.res, {
// users: process.env.BASIC_AUTH_CREDENTIALS,
// }));
// }
if (ctx.req && ctx.req.headers.cookie) {
typeof ctx.req.cookies.CookiePolicy != "undefined"