Commit d36e0487 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 cc9c90f5
......@@ -50,7 +50,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b
[template-default-slave-virtualhost]
_update_hash_filename_ = templates/default-virtualhost.conf.in
md5sum = a72e9056eeda3c7c794f6f6560056380
md5sum = 8137d3da8658d7b2d8c99c9a283a4e5e
[template-cached-slave-virtualhost]
_update_hash_filename_ = templates/cached-virtualhost.conf.in
......
......@@ -121,7 +121,7 @@
# Zope configuration
{%- for (proxy_name, proxy_comment) in proxy_append_list %}
# {{ proxy_comment }}
proxy /{{ proxy_name }} {{ backend_url }} {
proxy "/{{ proxy_name }}" {{ backend_url }} {
{{ proxy_header() }}
{%- if proxy_name == 'prefer-gzip' %}
without /prefer-gzip
......@@ -207,7 +207,7 @@
{%- endif %}
}
{%- for websocket_path in websocket_path_list %}
proxy /{{ websocket_path }} {{ backend_url }} {
proxy "/{{ websocket_path }}" {{ backend_url }} {
{{ proxy_header() }}
websocket
{%- if websocket_transparent %}
......@@ -236,7 +236,7 @@
{%- for (proxy_name, proxy_comment) in proxy_append_list %}
# {{ proxy_comment }}
proxy /{{ proxy_name }} {{ backend_url }} {
proxy "/{{ proxy_name }}" {{ backend_url }} {
{{ proxy_header() }}
{%- if proxy_name == '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