# API definition # location /api/warehouse/pricing { limit_except GET PATCH { deny all; } error_page 403 = @405; # Convert response from '403 (Forbidden)' to '405 (Method Not Allowed)' set $upstream pricing_service; rewrite ^ /_warehouse last; } location /api/warehouse/inventory { limit_except GET { deny all; } error_page 403 = @405; set $upstream inventory_service; rewrite ^ /_warehouse last; } # Policy section # location = /_warehouse { internal; set $api_name "Warehouse"; limit_req zone=client_ip_10rs; limit_req_status 429; proxy_pass http://$upstream$request_uri; } # vim: syntax=nginx