This commit is contained in:
parent
97d7ab2d0a
commit
17193fe18a
@ -4,7 +4,7 @@ import { isProduction } from "@ssr/common/utils/utils";
|
|||||||
export function middleware(request: NextRequest) {
|
export function middleware(request: NextRequest) {
|
||||||
const before = Date.now();
|
const before = Date.now();
|
||||||
const response = NextResponse.next();
|
const response = NextResponse.next();
|
||||||
const ip = request.headers.get("CF-Connecting-IP") || request.headers.get("X-Forwarded-For") || request.ip;
|
const ip = request.headers.get("CF-Connecting-IP") || request.headers.get("X-Forwarded-For");
|
||||||
|
|
||||||
// Log requests in production
|
// Log requests in production
|
||||||
if (isProduction()) {
|
if (isProduction()) {
|
||||||
|
Reference in New Issue
Block a user