updated copy
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import Document, { Html, Head, Main, NextScript } from "next/document";
|
||||
import SkipLink from "../components/skiplink";
|
||||
import { Tracking, TrackingNoScript } from "../components/tracking";
|
||||
import basicAuthMiddleware from "nextjs-basic-auth-middleware";
|
||||
import { nanoid } from "nanoid";
|
||||
|
||||
class MyDocument extends Document {
|
||||
@@ -10,19 +9,6 @@ class MyDocument extends Document {
|
||||
|
||||
let useGATracking = false;
|
||||
|
||||
//remove this block when not need after softlaunch
|
||||
// let hasBasicAuth =
|
||||
// typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
|
||||
|
||||
// console.log("hasbasicAuth:", hasBasicAuth);
|
||||
|
||||
// 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"
|
||||
? JSON.parse(ctx.req.cookies.CookiePolicy).usage == "accepted"
|
||||
|
||||
Reference in New Issue
Block a user