Skip to content

Instantly share code, notes, and snippets.

View FatehAK's full-sized avatar
💻
¯\_(ツ)_/¯

Fateh AK FatehAK

💻
¯\_(ツ)_/¯
View GitHub Profile

To configure an HTTP -> HTTPS redirect using NextJs on Heroku, is necessary to configure a NextJs custom server.

Here is a custom server configured with the redirect working:

server.js

const express = require('express');
const cookieParser = require("cookie-parser");
const next = require('next');