JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 853
  • Score
    100M100P100Q111975F
  • License MIT

Nextjs Middleware to redirect http to https

Package Exports

  • next-ssl-redirect-middleware
  • next-ssl-redirect-middleware/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (next-ssl-redirect-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nextjs-ssl-redirect-middlewear

Nextjs Middleware to redirect http to https

Install

npm i -S next-ssl-redirect-middleware

Usage

Create a file pages/_middleware.ts (or .js) with the following:

import sslRedirect from 'next-ssl-redirect-middleware';

export const middleware = sslRedirect();

Notes:

paulomcnally/node-heroku-ssl-redirect was referenced in the creation of this library.