Address comments. Move auth and healthcheck inside nginx package

This commit is contained in:
Manuel de Brito Fontes 2016-05-31 12:22:04 -04:00
parent 221b823ca7
commit 6b841edff0
8 changed files with 39 additions and 20 deletions

View file

@ -190,6 +190,18 @@ http {
{{ $limits := buildRateLimit $location }}
{{- range $limit := $limits }}
{{ $limit }}{{ end }}
{{ if $location.Auth.Secured -}}
{{ if eq $location.Auth.Type "basic" }}
auth_basic "{{ $location.Auth.Realm }}";
auth_basic_user_file {{ $location.Auth.File }};
{{ else }}
#TODO: add nginx-http-auth-digest module
auth_digest "{{ $location.Auth.Realm }}";
auth_digest_user_file {{ $location.Auth.File }};
{{ end }}
{{- end }}
proxy_set_header Host $host;
# Pass Real IP