onehostname
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

One Hostname to Rule them All

This is an example Fly Edge Application for implementing one hostname.

How it works

Backend types are defined in src/backends.js. These create a fetch like function for proxying requests to a specific origin. Each backend type manages the headers it sets, some origin sources expect certain host headers, each needs a different set of x-forwarded-* headers.

Try it out

Install fly, clone this repo, start the server.

$ npm install -g @fly/fly
$ git clone https://github.com/superfly/onehostname.git
cd onehostname
$ fly server

And then visit http://localhost:3000 in your browser. Or http://localhost:3000/heroku/. Or something from here: index.js#L14-L18.

Package Sidebar

Install

npm i onehostname

Homepage

fly.io

Weekly Downloads

3

Version

0.1.1

License

Apache-2.0

Unpacked Size

42.2 kB

Total Files

12

Last publish

Collaborators

  • mrkurt