diff --git a/docker-compose.yml b/docker-compose.yml index b485aa274..3a4d23267 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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' diff --git a/nginx.conf b/nginx.conf index e605d3586..b41d91c4f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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!";