Skip to content

Commit

Permalink
clean up template files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Ryan committed May 31, 2024
1 parent 083df06 commit 512e27b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
29 changes: 0 additions & 29 deletions internal/configs/version2/nginx-plus.virtualserver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -254,23 +254,9 @@ server {
{{- end }}

{{- with $s.APIKey}}
# API KEY POLICY
# not supplied: {{ .RejectCodeNotSupplied }}
# no match: {{ .RejectCodeNoMatch }}

js_var $apikey_auth_local_map "{{ .MapName}}";
js_var $apikey_auth_token $apikey_auth_hash;
auth_request /_validate_apikey_njs;
{{- range $header := .Header}}
# header: {{ $header }}
{{- end -}}
{{- range $query := .Query }}
# query: {{ $query }}
{{- end -}}
{{- range $client := .Clients }}
# client: {{ $client.ClientID }}
# secret: {{ $client.EncryptedKey }}
{{- end }}
{{- end }}

{{- with $s.WAF }}
Expand Down Expand Up @@ -474,25 +460,10 @@ server {


{{- with $l.APIKey}}
# API KEY POLICY
# not supplied: {{ .RejectCodeNotSupplied }}
# no match: {{ .RejectCodeNoMatch }}

set $apikey_auth_local_map "{{ .MapName }}";
set $header_query_value {{ makeHeaderQueryValue $l.APIKey | printf }};
set $apikey_auth_token $apikey_auth_hash;
auth_request /_validate_apikey_njs;

{{- range $header := .Header}}
# header: {{ $header }}
{{- end -}}
{{- range $query := .Query }}
# query: {{ $query }}
{{- end -}}
{{- range $client := .Clients }}
# client: {{ $client.ClientID }}
# secret: {{ $client.EncryptedKey }}
{{- end }}
{{- else }}
{{- with $s.APIKey }}
set $header_query_value {{ makeHeaderQueryValue $s.APIKey | printf }};
Expand Down
30 changes: 0 additions & 30 deletions internal/configs/version2/nginx.virtualserver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,9 @@ server {
{{- end }}

{{- with $s.APIKey}}
# API KEY POLICY
# not supplied: {{ .RejectCodeNotSupplied }}
# no match: {{ .RejectCodeNoMatch }}

js_var $apikey_auth_local_map "{{ .MapName}}";
js_var $apikey_auth_token $apikey_auth_hash;
auth_request /_validate_apikey_njs;


{{- range $header := .Header}}
# header: {{ $header }}
{{- end -}}
{{- range $query := .Query }}
# query: {{ $query }}
{{- end -}}
{{- range $client := .Clients }}
# client: {{ $client.ClientID }}
# secret: {{ $client.EncryptedKey }}
{{- end }}
{{- end }}

{{- with $s.EgressMTLS }}
Expand Down Expand Up @@ -285,25 +269,11 @@ server {
{{- end }}

{{- with $l.APIKey}}
# API KEY POLICY
# not supplied: {{ .RejectCodeNotSupplied }}
# no match: {{ .RejectCodeNoMatch }}

set $apikey_auth_local_map "{{ .MapName }}";
set $header_query_value {{ makeHeaderQueryValue $l.APIKey | printf }};
set $apikey_auth_token $apikey_auth_hash;
auth_request /_validate_apikey_njs;

{{- range $header := .Header}}
# header: {{ $header }}
{{- end -}}
{{- range $query := .Query }}
# query: {{ $query }}
{{- end -}}
{{- range $client := .Clients }}
# client: {{ $client.ClientID }}
# secret: {{ $client.EncryptedKey }}
{{- end }}
{{- else }}
{{- with $s.APIKey }}
set $header_query_value {{ makeHeaderQueryValue $s.APIKey | printf }};
Expand Down

0 comments on commit 512e27b

Please sign in to comment.