File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 server {
77 listen 8080 ;
88
9+ # OAuth discovery documents (RFC 8414 / RFC 9728) must reach the app with the
10+ # URI intact. `^~` makes this prefix win over the legacy /{apiKey}/{rest} regex
11+ # below, which would otherwise treat ".well-known" as an API key and rewrite the
12+ # path to /oauth-protected-resource (404). This is what the 401 challenge's
13+ # `resource_metadata` URL points at, so it MUST resolve.
14+ location ^~ /.well-known/ {
15+ proxy_buffering off;
16+ proxy_read_timeout 30s ;
17+ proxy_send_timeout 30s ;
18+ proxy_set_header Host $host ;
19+ proxy_set_header X-Forwarded-For $remote_addr ;
20+ proxy_set_header X-Forwarded-Proto $scheme ;
21+ proxy_pass http ://app;
22+ }
23+
924 # Header-based with version: /v1|v2/{rest} (MUST COME BEFORE LEGACY)
1025 location ~ ^/v( ?:1|2) /( .*) $ {
1126 proxy_buffering off;
You can’t perform that action at this time.
0 commit comments