Skip to content

Commit

Permalink
feat: add support of the nginx port_in_redirect directive (#627)
Browse files Browse the repository at this point in the history
Close: #625 <hr>This is an automatic backport of pull request #626 done by [Mergify](https://mergify.com).
  • Loading branch information
mergify[bot] committed Apr 25, 2024
1 parent bc8efa2 commit a5118e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/config.ini.custom
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ real_ip_set_from=172.16.0.0/12,192.168.0.0/16,10.0.0.0/8
# (1 => enabled, 0 => disabled)
server_tokens=1

# Enables or disables specifying the port in absolute redirects issued by nginx.
# see http://nginx.org/en/docs/http/ngx_http_core_module.html#port_in_redirect
# (1 => on, 0 => off)
port_in_redirect=1

# If >0, override the global setting [log]/max_size_before_rotation
# for the nginx daemon (only)
max_size_before_rotation=-1
Expand Down
6 changes: 6 additions & 0 deletions config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ http {
server_tokens off;
{% endif %}

{% if MFSERV_NGINX_PORT_IN_REDIRECT == "1" %}
port_in_redirect on;
{% else %}
port_in_redirect off;
{% endif %}

lua_package_path '{{LUA_PACKAGE_PATH}}';
lua_code_cache on;

Expand Down

0 comments on commit a5118e9

Please sign in to comment.