Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-ssl-redirect-middleware

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-ssl-redirect-middleware - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

1

dist/index.js

@@ -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);

2

package.json
{
"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") {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc