mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-11-30 03:37:22 +07:00
fix redirect https : show port only if not 443
This commit is contained in:
1 parent
f1af8991fd
commit
a60e81cc1f
2 files changed
+9
-8
No files matched your search
@@ -28,7 +28,7 @@ server {
|
||||
listen {{ port }}{% if port | int in __http_proxy_protocol_port %} proxy_protocol{% endif %};
|
||||
{% endfor %}
|
||||
server_name {{ name }};
|
||||
return 301 https://{{ name }}{% if '443' not in __listen_ssl %}:{{ __listen_ssl[0] }}{% endif %}$request_uri;
|
||||
return 301 https://{{ name }}{% if '443' not in __listen_ssl and 443 not in __listen_ssl %}:{{ __listen_ssl[0] }}{% endif %}$request_uri;
|
||||
}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
Reference in new issue
Block a user