Skip to content

Commit 4283edb

Browse files
Copilotfzipi
andcommitted
docs: add breaking change note for port_in_redirect off in README.md
Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
1 parent 18ce05c commit 4283edb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ An example can be seen in the [docker-compose](https://github.com/coreruleset/mo
155155
156156
Both nginx and httpd containers now run with an **unprivileged user**. This means that we cannot bind to ports below 1024, so you might need to correct your `PORT` and `SSL_PORT` settings. Now the defaults for both nginx and httpd are `8080` and `8443`.
157157

158+
### Nginx `port_in_redirect` breaking change
159+
160+
> [!WARNING]
161+
> nginx now has [`port_in_redirect`](https://nginx.org/en/docs/http/ngx_http_core_module.html#port_in_redirect) set to `off` in all server blocks.
162+
163+
Previously, nginx's default `port_in_redirect on` caused the internal listening port (e.g., `8080` or `8443`) to be included in redirect `Location` headers (e.g., when nginx adds a trailing slash: `/address``http://example.com:8080/address/`). This broke setups where the container is behind a reverse proxy and the external port differs from the internal port.
164+
165+
With `port_in_redirect off`, nginx omits the port from redirect URLs, so clients follow redirects using the correct external port. **If you relied on the port being included in nginx-generated redirects, you will need to mount a custom `default.conf.template` and re-enable this directive.**
166+
158167
### Common ENV Variables
159168

160169
These variables are common to image variants and will set defaults based on the image name.

0 commit comments

Comments
 (0)