JSPM

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

enable HTTPS in your local development environment with automatically generated certificates

Package Exports

  • nassau-https-proxy
  • nassau-https-proxy/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 (nassau-https-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Simple HTTPS server for development

This is a simple SSL-stripping reverse proxy for local development. You don’t need to configure your apache or nginx or vagrant or whatever to use SSL. Just complete a simple setup and all of your local projects will be available over HTTPS without browser warnings.

Requirements & Setup

npm install -g nassau-https-proxy

You need to have openssl available on your system, since it’s used to generate certs.

Run proxy

For convenience, proxy listens on the default HTTPS port (443) so it needs to be ran as root:

$ sudo nassau-https-proxy
Listening on 443. Forwarding to http://localhost:80
Add this cert as a trusted root to get rid of SSL warnings: /home/bob/.nassau-proxy/ssl.proxy.nassau.crt

The cert will be added to your system keychain during install, but if something goes wrong, you may always do this manually:

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/.nassau-proxy/ssl.proxy.nassau.crt

Or:

open ~/.nassau-proxy/ssl.proxy.nassau.crt

And set it to "always trust". Google it if you have any problems

Alternate port

If you need to run it on a different port, use PORT env:

env PORT=8443 nassau-https-proxy

Forwarding address

By default it forwards to your local apache/nginx instance. You can change this behaviour using env variables:

env FORWARD_PORT=8080 FORWARD_HOST=vagrant-for-example nassau-https-proxy

Proxy Timeout

By default, it waits five minutes for a response from the proxied server. You can adjust the timeout using PROXY_TIMEOUT. For example, if you want to adjust the timeout to 10 minutes:

env PROXY_TIMEOUT=600 nassau-https-proxy

Enjoy

After trusting the generated root certificate (ssl.proxy.nassau.crt), your browser will accept any dummy cert generated for your domains by the proxy. Navigate to https://localhost to check the results.