Created
February 10, 2020 14:32
-
-
Save bgautrea/231ef781b408204594e7c749f6feaa2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subrequest_output_buffer_size 32k; | |
# | |
# API definition | |
# | |
location /api/f1 { | |
limit_except GET {} | |
set $upstream f1_ergast; | |
rewrite ^ /_f1 last; | |
} | |
# Policy section | |
# | |
location = /_jwks_uri { | |
internal; | |
proxy_method GET; | |
proxy_cache jwk; # Cache responses | |
proxy_pass https://login.microsoftonline.com/<TENENT_ID>/discovery/v2.0/keys; | |
} | |
location = /_f1 { | |
internal; | |
set $api_name "Ergast"; | |
auth_jwt "Foo"; | |
auth_jwt_key_request /_jwks_uri; | |
proxy_set_header Host "ergast.com"; | |
proxy_pass https://$upstream$request_uri; | |
} | |
# vim: syntax=nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment