underpants icon indicating copy to clipboard operation
underpants copied to clipboard

Config changes for running behind a proxy

Open alexhornbake opened this issue 6 years ago • 0 comments

First off this is a great project. At one point I was wrestling with bitly's oauth proxy, which was design with a more 1:1 proxy:service use case in mind. I really appreciate the simple config file and from/to frontend/backend routing.

These modifications were needed to easily run this behind an AWS load balancer (doing SSL termination). These changes should in theory allow it to run behind any proxy.

Also, needed to support some of the config moving to ENV vars.

Changes:

  • use-https : true/false config field to force https scheme. Allows SSL termination to happen on a proxy before underpants, but for underpants to still redirect to https urls.
  • Remove concatenation of "Host" + "Port". "Host" now represents the name and port (if desired). Allows underpants to run on non standard (80 or 443) port behind another proxy listening on standard port.
  • Add support for ENV VARs to override the oauth config. This allows underpants.json config to be under source control, without having to include the oauth id/secret.

alexhornbake avatar Mar 05 '18 18:03 alexhornbake