diff --git a/.gitignore b/.gitignore index a6307a3d5..254f525af 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,5 @@ token.json api/main_endpoints/routes/printing/* !api/main_endpoints/routes/printing/keep + +interview/*.json diff --git a/docker-compose.yml b/docker-compose.yml index f9a0395bc..b485aa274 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -114,6 +114,7 @@ services: - ./sce_sjsu_edu_cert.cer:/etc/nginx/sce_sjsu_edu_cert.cer - ./sce.key:/etc/nginx/sce.key - nginx_cache:/var/cache/nginx + - ./interview/costco_gas.json:/var/www/html/data/costco_gas.json:ro command: [nginx-debug, '-g', 'daemon off;'] ports: - '80:80' diff --git a/nginx.conf b/nginx.conf index 4d6738a51..1a944f946 100644 --- a/nginx.conf +++ b/nginx.conf @@ -102,9 +102,18 @@ http { return 302 $scheme://$http_host/status/$is_args$args; } - location ~ ^/spartan-compass(/.*)? { - proxy_set_header Host $http_host; - proxy_pass http://compass-app:3000; + location ~ ^/gas/?$ { + root /var/www/html/data/; + + try_files /costco_gas.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!"; } #Load balancer