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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ token.json

api/main_endpoints/routes/printing/*
!api/main_endpoints/routes/printing/keep

interview/*.json
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 12 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down