0.1.0 • Published 3 years ago

@autotelic/fastify-redirect-heroku v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Fastify Redirect Heroku

A Fastify plugin to redirect away from a Heroku domain to an authorized host.

Usage

npm i @autotelic/fastify-redirect-heroku
const redirectHeroku = require('@autotelic/fastify-redirect-heroku')

module.exports = async function (fastify, options) {
  fastify.register(redirectHeroku, {
    authHost: 'https://example.com/',
    herokuAppName: 'example-api'
  })
}

API

Options

NameStatusTypeDefaultDescription
authHostRequiredString-The authorized host to redirect to
herokuAppNameRequiredString-The name of the heroku app to redirect away from