Skip to content

Commit ad2cf79

Browse files
[cherry-pick] Don't send request headers & body to jwks uri (#8125)
1 parent d05b3de commit ad2cf79

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/configs/version2/__snapshots__/templates_test.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ server {
11151115
proxy_set_header Content-Length "";
11161116
proxy_cache jwks_uri_cafe;
11171117
proxy_cache_valid 200 12h;
1118+
proxy_pass_request_headers off;
1119+
proxy_pass_request_body off;
11181120
proxy_set_header Host idp.spec.example.com;
11191121
set $idp_backend idp.spec.example.com;
11201122
proxy_pass https://$idp_backend:443/spec-keys;
@@ -1125,6 +1127,8 @@ server {
11251127
proxy_set_header Content-Length "";
11261128
proxy_cache jwks_uri_cafe;
11271129
proxy_cache_valid 200 12h;
1130+
proxy_pass_request_headers off;
1131+
proxy_pass_request_body off;
11281132
proxy_set_header Host idp.route.example.com;
11291133
set $idp_backend idp.route.example.com;
11301134
proxy_pass http://$idp_backend:80/route-keys;
@@ -1235,6 +1239,8 @@ server {
12351239
proxy_set_header Content-Length "";
12361240
proxy_cache jwks_uri_cafe;
12371241
proxy_cache_valid 200 12h;
1242+
proxy_pass_request_headers off;
1243+
proxy_pass_request_body off;
12381244
proxy_set_header Host idp.spec.example.com;
12391245
set $idp_backend idp.spec.example.com;
12401246
proxy_pass https://$idp_backend:443/spec-keys;
@@ -1245,6 +1251,8 @@ server {
12451251
proxy_set_header Content-Length "";
12461252
proxy_cache jwks_uri_cafe;
12471253
proxy_cache_valid 200 12h;
1254+
proxy_pass_request_headers off;
1255+
proxy_pass_request_body off;
12481256
proxy_set_header Host idp.route.example.com;
12491257
set $idp_backend idp.route.example.com;
12501258
proxy_pass http://$idp_backend:80/route-keys;

internal/configs/version2/nginx-plus.virtualserver.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ server {
237237
proxy_cache_valid 200 12h;
238238
{{- end }}
239239
{{- with .JwksURI }}
240+
proxy_pass_request_headers off;
241+
proxy_pass_request_body off;
240242
proxy_set_header Host {{ .JwksHost }};
241243
set $idp_backend {{ .JwksHost }};
242244
proxy_pass {{ .JwksScheme}}://$idp_backend{{ if .JwksPort }}:{{ .JwksPort }}{{ end }}{{ .JwksPath }};

0 commit comments

Comments
 (0)