# Warehouse API (precise definition) # location /api/warehouse/ { # Policy configuration here (authentication, rate limiting, logging, more...) # access_log /var/log/nginx/warehouse_api.log main; # URI routing # location = /api/warehouse/inventory { # Complete inventory proxy_pass http://warehouse_inventory; } location ~ ^/api/warehouse/inventory/shelf/[^/]+$ { # Shelf inventory proxy_pass http://warehouse_inventory; } location ~ ^/api/warehouse/inventory/shelf/[^/]+/box/[^/]+$ { # Box on shelf proxy_pass http://warehouse_inventory; } location ~ ^/api/warehouse/pricing/[^/]+$ { # Price for specific item proxy_pass http://warehouse_pricing; } return 404; # Catch-all } # vim: syntax=nginx