Opened 9 years ago
Last modified 8 years ago
#1145 new enhancement
Can't set redirection port to the port from the "Host" request header field
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | nginx-module | Version: | 1.10.x |
| Keywords: | Cc: | ||
| uname -a: | Linux 4.8.10-1-ARCH #1 SMP PREEMPT Mon Nov 21 11:55:43 CET 2016 x86_64 GNU/Linux | ||
| nginx -V: | nginx version: nginx/1.10.2 | ||
Description
Currently you can't set the redirection port to the one that is specified by the HTTP Host field. There should be another possible value for port_in_redirection that does exactly this.
Example: The client requests path /test from the host example.com:4545. The server now responds with a redirection to the location http://example.com:4545/test2
Also, compare server_name_in_redirect and port_in_redirect, they strangely do very different things altough their names are similiar:
server_name_in_redirect onmeans the server name specified by the server_name directive is usedserver_name_in_redirect offmeans the server name specified in the "Host" request header field is used
but
port_in_redirect onmeans the port specified by the listen directive is usedport_in_redirect offmeans that no port is send
This is not intuitive and also misleading because server_name_in_redirect off actually sends a server name in the redirection packet..
Note:
See TracTickets
for help on using tickets.

See also #1000.