|
|
|
@ -20,6 +20,7 @@ http {
|
|
|
|
|
# tcp_nodelay on;
|
|
|
|
|
# gzip on;
|
|
|
|
|
client_max_body_size 1m;
|
|
|
|
|
proxy_cache_path ./cache/ keys_zone=public_api_cache:1m;
|
|
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
listen 8080 default_server;
|
|
|
|
@ -83,6 +84,18 @@ http {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /api/public {
|
|
|
|
|
add_header "Access-Control-Allow-Origin" *;
|
|
|
|
|
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD, DELETE";
|
|
|
|
|
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
|
|
|
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
|
|
|
|
|
|
|
|
proxy_cache public_api_cache;
|
|
|
|
|
proxy_cache_valid 200 8s;
|
|
|
|
|
default_type application/json;
|
|
|
|
|
proxy_pass http://backend:3000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /api {
|
|
|
|
|
default_type application/json;
|
|
|
|
|
proxy_pass http://backend:3000;
|
|
|
|
|