test: x-forwarded-proto
This commit is contained in:
@@ -17,6 +17,11 @@ export default async function middleware(req: NextRequest) {
|
||||
requestHeaders.set("x-xlog-search", req.nextUrl.search)
|
||||
requestHeaders.set("x-xlog-ip", getClientIp(req) || "")
|
||||
|
||||
console.log(
|
||||
`x-forwarded-proto: ${req.headers.get(
|
||||
"x-forwarded-proto",
|
||||
)}, cf-visitor: ${req.headers.get("cf-visitor")}`,
|
||||
)
|
||||
if (
|
||||
IS_PROD &&
|
||||
req.headers.get("x-forwarded-proto") !== "https" &&
|
||||
|
||||
Reference in New Issue
Block a user