GithubHelp home page GithubHelp logo

phase2 / docker-https-proxy Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 6.0 12 KB

Handles HTTPS proxying with automatic self-signed certs for SSL termination.

Home Page: https://hub.docker.com/r/outrigger/https-proxy/

Shell 100.00%
docker-image outrigger ssl-termination

docker-https-proxy's Issues

Add support for multi-domain/wildcard domains

Goal

In order to proxy URLs that encode key parameter details as part of the domain, we need better built-in support for multiple domains or wildcard domains.

Environment

Local development, wherein the "multiple URL" nature leans on the implicit "wildcarding" provided by Outrigger DNSDock. For example, api.projectname.vm, fr.api.rojectname.vm, de.api.projectname.vm will all be routed to the same container.

Required Actions

Populated X-Forwarded-Host with the Request Domain

Provide instructions on how to get variable domains registered in the X-Forwarded-Host header so the upstream can examine the downstream request host, embedded with key request parameters.

Preferred: nginx-only (Not Working)

In our target environment context, the "wildcard DNS" approach works but I have not found how to populate the X-Forwarded-Host header with the full request domain, it is reduced to the actual DNS entry. nginx proxy requests are sent with an Origin header that includes the correct domain.

Fallback: nginx & docker-compose (Working)

  • nginx.conf.tmpl: Replace X-Forwarded-Host configuration of {{ getenv "PROXY_DOMAIN"}} with $host. In this way the forwarded host should use whatever reaches it. (This was not sufficient for the nginx-only approach above.)

  • docker-compose.yml: Add com.dnsdock.aliases, with comma-delimited entries for each variant domain

labels:
  com.dnsdock.aliases: fr.api.rojectname.vm, de.api.projectname.vm

Wildcard/Multi-domain CSR Certificate

Still researching.

X-Forwarded-Port Env var

Would it be possible to change X-Forwarded-Port to an environment var instead of statically set to 443?

I run multiple docker instances and usually have them on non-standard ports.

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.