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 vhost.d includes to nginx.tmpl's https redirect server block #1618

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dakotahawkins
Copy link

Adds customization points to https redirect responses that are analogous
to other response handling. This gives you the opportunity to add
response headers or etc. before returning the 301 redirect.

If $host or default exist in /etc/nginx/vhost.d/, we rely on
nginx-proxy/acme-companion to add the Let's Encrypt acme challenge
location block there, so it's only included here if those files don't
exist.

New tests in test_ssl are similar to tests in test_custom, except they
expect 301 responses along with custom configs.

Fixes #1613

@buchdag buchdag added type/feat PR for a new feature type/fix PR for a bug fix type/test PR that add missing tests or correct existing tests labels Aug 3, 2021
Adds customization points to https redirect responses that are analogous
to other response handling. This gives you the opportunity to add
response headers or etc. before returning the 301 redirect.

If `$host` or `default` exist in `/etc/nginx/vhost.d/`, we rely on
nginx-proxy/acme-companion to add the Let's Encrypt acme challenge
location block there, so it's only included here if those files don't
exist.

New tests in `test_ssl` are similar to tests in `test_custom`, except they
expect 301 responses along with custom configs.

Fixes nginx-proxy#1613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feat PR for a new feature type/fix PR for a bug fix type/test PR that add missing tests or correct existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should nginx.tmpl's https_method=redirect block try to include vhost.d files?
2 participants