Skip to content

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
@buchdag buchdag force-pushed the https-redirect-customization-points branch from 8a9a267 to 9bad218 Compare August 3, 2021 06:59
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