Update nginx.tmpl
- Add VIRTUAL_PROTO=custome
This commit is contained in:
parent
c4ad18fecc
commit
76ba6b6f58
1 changed files with 34 additions and 28 deletions
|
@ -51,6 +51,11 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "location" }}
|
{{ define "location" }}
|
||||||
|
{{ if eq .Proto "custome" }}
|
||||||
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }}
|
||||||
|
include {{ printf "/etc/nginx/vhost.d/%s_location" .Host }};
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
location {{ .Path }} {
|
location {{ .Path }} {
|
||||||
{{ if eq .NetworkTag "internal" }}
|
{{ if eq .NetworkTag "internal" }}
|
||||||
# Only allow traffic from internal clients
|
# Only allow traffic from internal clients
|
||||||
|
@ -84,6 +89,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ define "upstream" }}
|
{{ define "upstream" }}
|
||||||
{{ $networks := .Networks }}
|
{{ $networks := .Networks }}
|
||||||
|
|
Loading…
Reference in a new issue