Skip to content

Instantly share code, notes, and snippets.

@scottwater scottwater/index.js
Created Mar 27, 2019

Embed
What would you like to do?
Heroku/Fly SSL Proxy
import { proxy } from "@fly/cdn"
import { httpsUpgrader } from "@fly/cdn/lib/middleware"
const origin = proxy("https://YOURAPP.herokuapp.com", {
headers: { host: "YOURAPP.herokuapp.com" }
})
const router = httpsUpgrader(origin)
fly.http.respondWith(router)
{
"dependencies": {
"@fly/cdn": "^0.5.2"
},
"scripts": {
"start": "yarn fly server",
"test": "yarn fly test"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.