"port_in_redirect off" did not work the bug had been appeared in r2530 and r2534
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c index 21ee3bb..332fceb 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c
@@ -357,6 +357,9 @@ else #endif port = (port == 80) ? 0 : port; + + } else { + port = 0; } if (port) {