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 authored and Nicolas Duchon committed 2022-02-24 15:08:17 +01:00
1 parent 4b85e95824
commit 33eab70d32
7 files changed
+68

No files matched your search

+2
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 }}