Make slashless-redirect safer
This commit is contained in:
parent
74845395e3
commit
04eb6cee8b
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ traefik.docker.network={{ nextcloud_container_labels_traefik_docker_network }}
|
||||||
{% set middlewares = [] %}
|
{% set middlewares = [] %}
|
||||||
|
|
||||||
{% if nextcloud_container_labels_traefik_path_prefix != '/' %}
|
{% if nextcloud_container_labels_traefik_path_prefix != '/' %}
|
||||||
traefik.http.middlewares.{{ nextcloud_identifier }}-slashless-redirect.redirectregex.regex=({{ nextcloud_container_labels_traefik_path_prefix | quote }})$
|
traefik.http.middlewares.{{ nextcloud_identifier }}-slashless-redirect.redirectregex.regex=^({{ nextcloud_container_labels_traefik_path_prefix | quote }})$
|
||||||
traefik.http.middlewares.{{ nextcloud_identifier }}-slashless-redirect.redirectregex.replacement=${1}/
|
traefik.http.middlewares.{{ nextcloud_identifier }}-slashless-redirect.redirectregex.replacement=${1}/
|
||||||
{% set middlewares = middlewares + [nextcloud_identifier + '-slashless-redirect'] %}
|
{% set middlewares = middlewares + [nextcloud_identifier + '-slashless-redirect'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue