Ensure a single / is used for the PathPrefix
This commit is contained in:
parent
bdf6f35c55
commit
1b8667670a
|
@ -27,7 +27,7 @@
|
|||
"[[ .traefik.instance ]].http.routers.[[ .traefik.router ]].rule=[[ .traefik.rule ]]",
|
||||
[[- else if .traefik.auto_rule ]]
|
||||
"[[ .traefik.instance ]].http.routers.[[ .traefik.router ]].rule=Host(`[[ (urlParse .public_url).Hostname ]]`)
|
||||
[[- if not (regexp.Match "^/?$" (urlParse .public_url).Path) ]] && PathPrefix(`[[ (urlParse .public_url).Path ]]`)[[ end ]]",
|
||||
[[- if not (regexp.Match "^/?$" (urlParse .public_url).Path) ]] && PathPrefix(`[[ (urlParse .public_url).Path | regexp.Replace "^//" "/" ]]`)[[ end ]]",
|
||||
[[- end ]]
|
||||
[[- if and (has .traefik "csp") (isKind "map" .traefik.csp) ]]
|
||||
"[[ .traefik.instance ]].http.middlewares.csp-[[ .traefik.router ]].headers.contentsecuritypolicy=[[ range $k, $v := .traefik.csp ]][[ $k ]] [[ $v ]];[[ end ]]",
|
||||
|
|
Loading…
Reference in New Issue
Block a user