Commit 2ae85e56 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Really support proxy path with spaces

Caddy's proxy stanza for defined path with spaces sometimes is working when
it's done like this:

  proxy /path with_spaces ip:port

It happens, that few first requests after starting Caddy it's working, but
then it fails with error message like:

  dial tcp: lookup with_spaces on ip: no such host

So to stabilise situation now paths are generated like:

  proxy "/path with_spaces" ip:port
parent d2bc05c6
...@@ -50,7 +50,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b ...@@ -50,7 +50,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b
[template-default-slave-virtualhost] [template-default-slave-virtualhost]
_update_hash_filename_ = templates/default-virtualhost.conf.in _update_hash_filename_ = templates/default-virtualhost.conf.in
md5sum = 82c3908c9f6346356179646211058bf5 md5sum = 266f175dbdfc588af7a86b0b1884fe73
[template-backend-haproxy-configuration] [template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in _update_hash_filename_ = templates/backend-haproxy.cfg.in
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
# Zope configuration # Zope configuration
{%- for (proxy_name, proxy_comment) in proxy_append_list %} {%- for (proxy_name, proxy_comment) in proxy_append_list %}
# {{ proxy_comment }} # {{ proxy_comment }}
proxy /{{ proxy_name }} {{ backend_url }} { proxy "/{{ proxy_name }}" {{ backend_url }} {
{{ proxy_header() }} {{ proxy_header() }}
{%- if proxy_name == 'prefer-gzip' %} {%- if proxy_name == 'prefer-gzip' %}
without /prefer-gzip without /prefer-gzip
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
{%- endif %} {%- endif %}
} }
{%- for websocket_path in websocket_path_list %} {%- for websocket_path in websocket_path_list %}
proxy /{{ websocket_path }} {{ backend_url }} { proxy "/{{ websocket_path }}" {{ backend_url }} {
{{ proxy_header() }} {{ proxy_header() }}
websocket websocket
{%- if websocket_transparent %} {%- if websocket_transparent %}
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
{%- for (proxy_name, proxy_comment) in proxy_append_list %} {%- for (proxy_name, proxy_comment) in proxy_append_list %}
# {{ proxy_comment }} # {{ proxy_comment }}
proxy /{{ proxy_name }} {{ backend_url }} { proxy "/{{ proxy_name }}" {{ backend_url }} {
{{ proxy_header() }} {{ proxy_header() }}
{%- if proxy_name == 'prefer-gzip' %} {%- if proxy_name == 'prefer-gzip' %}
without /prefer-gzip without /prefer-gzip
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment