"description":"Type of slave. If redirect, the slave will redirect to the given url. If zope, the rewrite rules will be compatible with Virtual Host Monster. Implemented are default, zope and redirect, not implemneted are notebook and eventsource.",
"enum":[
"",
"zope"
],
"title":"Backend Type",
"type":"string"
},
"custom_domain":{
"description":"Custom Domain to use for the website",
"description":"Server Alias List separated by space",
"title":"Server Alias",
"type":"string"
},
"default-path":{
"default":"",
"description":"Provide default path to redirect user to when user access / (the site root)",
"title":"type:zope Default Path",
"type":"string"
},
"disable-no-cache-request":{
"default":"false",
"description":"If set to true, Cache-Control and Pragma requests headers will not be sent to cache and backend servers. This prevents clients from bypassing cache when enable_cache is true",
"description":"If set to true, Via response headers will not be sent to client",
"enum":[
"false",
"true"
],
"title":"enable_cache: Disable 'Via' headers from cache",
"type":"string"
},
"disabled-cookie-list":{
"default":"",
"description":"List of Cookies separated by space that will not be sent to cache and backend servers. This is especially useful to discard analytics tracking cookies when using Vary: Cookie cache headers",
"title":"Disabled Cookies",
"type":"string"
},
"enable_cache":{
"default":"false",
"description":"If set to true, http caching server (Apache Traffic Server) will be used between frontend Caddy and backend",
"enum":[
"false",
"true"
],
"title":"Enable Cache",
"type":"string"
},
"https-only":{
"default":"false",
"description":"If set to true, http requests will be redirected to https",
"enum":[
"false",
"true"
],
"title":"HTTPS Only",
"type":"string"
},
"path":{
"default":"",
"description":"Path to proxy to in the backend",
"title":"type:zope Backend Path",
"type":"string"
},
"prefer-gzip-encoding-to-backend":{
"default":"false",
"description":"If set to true, frontend will rewrite Accept-Encoding request header to simply 'gzip' for all variants of Accept-Encoding containing 'gzip', in order to maximize cache hits for resources cached with Vary: Accept-Encoding when enable_cache is used",
"enum":[
"false",
"true"
],
"title":"Prefer gzip Encoding for Backend",
"type":"string"
},
"ssl_ca_crt":{
"default":"",
"description":"Content of the CA certificate file",
{%- if prefer_gzip and not (slave_type == 'zope' and backend_url) %}
rewrite {
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
to /prefer-gzip{uri}
}
{%- endif %} {#- if prefer_gzip #}
{%- endif %} {#- if prefer_gzip and not (slave_type == 'zope' and backend_url) #}
{%- if slave_type == 'zope' and backend_url %}
# Zope configuration
...
...
@@ -90,10 +90,18 @@
/ {scheme}://{host}/{{ default_path }}
} {# redir #}
{%- endif %} {#- if default_path #}
{%- if prefer_gzip %}
rewrite {
regexp (.*)
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
to /prefer-gzip/VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') | int }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
}
{%- else %}
rewrite {
regexp (.*)
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') | int }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
} {# rewrite #}
{%- endif %} {#- if prefer_gzip #}
{%- elif slave_type == 'redirect' and backend_url %} {#- if slave_type == 'zope' and backend_url #}
{%- if prefer_gzip and not (slave_type == 'zope' and backend_url) %}
rewrite {
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
to /prefer-gzip{uri}
}
{%- endif %} {#- if prefer_gzip #}
{%- endif %} {#- if prefer_gzip and not (slave_type == 'zope' and backend_url) #}
{%- if https_only %}
# Enforced redirection to SSL-enabled host
...
...
@@ -211,10 +219,18 @@
/ {scheme}://{host}/{{ default_path }}
} {# redir #}
{%- endif %} {#- if default_path #}
{%- if prefer_gzip %}
rewrite {
regexp (.*)
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
to /prefer-gzip/VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-http-port', '80') | int }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
}
{%- else %}
rewrite {
regexp (.*)
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-http-port', '80') | int }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}