Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ services:
- ./sce.key:/etc/nginx/sce.key
- nginx_cache:/var/cache/nginx
- ./interview/costco_gas.json:/var/www/html/data/costco_gas.json:ro
- ./interview/costco_warehouse.json:/var/www/html/data/costco_warehouse.json:ro
command: [nginx-debug, '-g', 'daemon off;']
ports:
- '80:80'
Expand Down
9 changes: 9 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ http {
add_header Access-Control-Allow-Origin *;
}

location ~ ^/warehouse/?$ {
root /var/www/html/data/;

try_files /costco_warehouse.json @fallback_oops;

default_type application/json;
add_header Access-Control-Allow-Origin *;
}

location @fallback_oops {
default_type text/plain;
return 404 "oops! we couldnt load your interview question lol, i guess this ones free!";
Expand Down
Loading