Merged PR 631: reinstated basic auth
reinstated basic auth Related work items: #6777
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ RELAYPATH = "test-pedw-hc"
|
|||||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
SHOWLOGIN = "true"
|
SHOWLOGIN = "true"
|
||||||
SHOWREPRESENTATIONS = "false"
|
SHOWREPRESENTATIONS = "false"
|
||||||
//BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
||||||
|
|
||||||
|
|
||||||
PORT= "3000"
|
PORT= "3000"
|
||||||
|
|||||||
+10
-10
@@ -9,18 +9,18 @@ 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);
|
console.log(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"
|
||||||
|
|||||||
Reference in New Issue
Block a user