# Warehouse API # location /api/warehouse/ { # Policy configuration here (authentication, rate limiting, logging...) # access_log /var/log/nginx/warehouse_api.log main; auth_jwt "Warehouse API"; auth_jwt_key_file /etc/nginx/idp_jwks.json; # URI routing # location /api/warehouse/inventory { limit_except GET { deny all; } error_page 403 = @405; # Convert deny response from '403 (Forbidden)' # to '405 (Method Not Allowed)' proxy_pass http://warehouse_inventory; } location /api/warehouse/pricing { limit_except GET PATCH { deny all; } if ($admin_permitted_method != "true") { return 403; } error_page 403 = @405; # Convert deny response from '403 (Forbidden)' # to '405 (Method Not Allowed)' proxy_pass http://warehouse_pricing; } return 404; # Catch-all } # vim: syntax=nginx