mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 17:58:16 +00:00
Merge pull request #1939 from ntnj/main
chore: indent location, upstream in template
This commit is contained in:
commit
70d33d976b
10
nginx.tmpl
10
nginx.tmpl
@ -51,10 +51,10 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "location" }}
|
{{ define "location" }}
|
||||||
location {{ .Path }} {
|
location {{ .Path }} {
|
||||||
{{ if eq .NetworkTag "internal" }}
|
{{ if eq .NetworkTag "internal" }}
|
||||||
# Only allow traffic from internal clients
|
# Only allow traffic from internal clients
|
||||||
include /etc/nginx/network_internal.conf;
|
include /etc/nginx/network_internal.conf;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if eq .Proto "uwsgi" }}
|
{{ if eq .Proto "uwsgi" }}
|
||||||
@ -88,7 +88,7 @@ location {{ .Path }} {
|
|||||||
{{ define "upstream" }}
|
{{ define "upstream" }}
|
||||||
{{ $networks := .Networks }}
|
{{ $networks := .Networks }}
|
||||||
{{ $debug_all := .Debug }}
|
{{ $debug_all := .Debug }}
|
||||||
upstream {{ .Upstream }} {
|
upstream {{ .Upstream }} {
|
||||||
{{ $server_found := "false" }}
|
{{ $server_found := "false" }}
|
||||||
{{ range $container := .Containers }}
|
{{ range $container := .Containers }}
|
||||||
{{ $debug := (eq (coalesce $container.Env.DEBUG $debug_all "false") "true") }}
|
{{ $debug := (eq (coalesce $container.Env.DEBUG $debug_all "false") "true") }}
|
||||||
@ -140,7 +140,7 @@ location {{ .Path }} {
|
|||||||
# Fallback entry
|
# Fallback entry
|
||||||
server 127.0.0.1 down;
|
server 127.0.0.1 down;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if ne $nginx_proxy_version "" }}
|
{{ if ne $nginx_proxy_version "" }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user