nginx/site: Fix upstream server hostnames
With current OpenBSD SNI negotation fails when hostname is not valid DNS name.
This commit is contained in:
parent
f371c3436f
commit
4db2622082
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
{% if proxy is defined and proxy is not string %}
|
||||
upstream upstream_{{ site }} {
|
||||
upstream upstream-{{ site }} {
|
||||
{% for item in proxy %}
|
||||
{% set item = item | regex_replace("^(https://)?([^/]*).*$", "\\2") %}
|
||||
{% if item | regex_search(".*:[0-9]+$") %}
|
||||
|
@ -39,7 +39,7 @@ server {
|
|||
{% set path = proxy[0] | regex_replace("^(https://)?([^/]*)(.*)$", "\\3") %}
|
||||
# https://trac.nginx.org/nginx/ticket/1307
|
||||
proxy_ssl_verify off;
|
||||
proxy_pass https://upstream_{{ site }}{{ path }};
|
||||
proxy_pass https://upstream-{{ site }}{{ path }};
|
||||
{% else %}
|
||||
proxy_pass {{ proxy }};
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue