next-ssl-redirect-middleware
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -6,2 +6,3 @@ "use strict"; | ||
const currentEnv = process.env.NODE_ENV; | ||
console.log('running middleware!'); | ||
if (environments.includes(currentEnv) && req.headers.get("x-forwarded-proto") !== "https") { | ||
@@ -8,0 +9,0 @@ return server_1.NextResponse.redirect(`https://${req.nextUrl.hostname}${req.nextUrl.pathname}`, status); |
{ | ||
"name": "next-ssl-redirect-middleware", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Nextjs Middleware to redirect http to https", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -15,2 +15,3 @@ import { NextFetchEvent, NextRequest, NextResponse } from 'next/server' | ||
const currentEnv = process.env.NODE_ENV as Environment; | ||
console.log('running middleware!'); | ||
@@ -17,0 +18,0 @@ if (environments.includes(currentEnv) && req.headers.get("x-forwarded-proto") !== "https") { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15031
130