1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-06-30 22:05:46 +00:00

feat: Add custom location block to virtual paths

This features allows the custom location blocks to be added to the
virtual path based routing. The custom config can be specified for each
container individually.
This commit is contained in:
Alexander Lieret
2021-07-06 15:41:14 +02:00
committed by Nicolas Duchon
parent 4b85e95824
commit 33eab70d32
7 changed files with 68 additions and 0 deletions

View File

@ -72,6 +72,8 @@ location {{ .Path }} {
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }}
include {{ printf "/etc/nginx/vhost.d/%s_location" .Host}};
{{ else if (exists (printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) )) }}
include {{ printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) }};
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
include /etc/nginx/vhost.d/default_location;
{{ end }}