Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multi-domain/wildcard domains #5

Open
grayside opened this issue Mar 22, 2018 · 0 comments
Open

Add support for multi-domain/wildcard domains #5

grayside opened this issue Mar 22, 2018 · 0 comments

Comments

@grayside
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant