2025-04-21 17:14:56 -07:00
|
|
|
server {
|
2025-08-25 12:41:18 -07:00
|
|
|
listen 8080;
|
|
|
|
|
server_name localhost;
|
2025-04-21 17:14:56 -07:00
|
|
|
|
2025-08-25 12:41:18 -07:00
|
|
|
client_max_body_size 10m; # <====== Add this line here (20MB in this case)
|
2025-04-21 17:14:56 -07:00
|
|
|
|
2025-08-25 12:41:18 -07:00
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
location /auth/ {
|
|
|
|
|
proxy_pass https://byte-camp-auth-service.fly.dev;
|
|
|
|
|
|
|
|
|
|
proxy_ssl_name byte-camp-auth-service.fly.dev; # <<<<< add this line
|
|
|
|
|
proxy_ssl_server_name on; # <<<<<< REQUIRED
|
|
|
|
|
|
|
|
|
|
# proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header Host byte-camp-auth-service.fly.dev;
|
|
|
|
|
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
|
# Set the cookie domain to match the frontend domain
|
|
|
|
|
proxy_cookie_domain byte-camp-auth-service.fly.dev snake-byte.org;
|
|
|
|
|
|
|
|
|
|
proxy_set_header Cookie $http_cookie;
|
|
|
|
|
proxy_cookie_path / /;
|
|
|
|
|
proxy_pass_request_headers on;
|
|
|
|
|
proxy_pass_request_body on;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /api/ {
|
|
|
|
|
proxy_pass https://byte-camp-auth-service.fly.dev;
|
|
|
|
|
|
|
|
|
|
proxy_ssl_name byte-camp-auth-service.fly.dev; # <<<<< add this line
|
|
|
|
|
proxy_ssl_server_name on; # <<<<<< REQUIRED
|
|
|
|
|
|
|
|
|
|
# proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header Host byte-camp-auth-service.fly.dev;
|
|
|
|
|
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
|
# Set the cookie domain to match the frontend domain
|
|
|
|
|
proxy_cookie_domain byte-camp-auth-service.fly.dev snake-byte.org;
|
|
|
|
|
|
|
|
|
|
proxy_pass_request_headers on;
|
|
|
|
|
proxy_pass_request_body on;
|
|
|
|
|
proxy_cookie_path / /;
|
|
|
|
|
|
|
|
|
|
proxy_set_header Cookie $http_cookie;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# location /assignment/ {
|
|
|
|
|
|
|
|
|
|
# proxy_pass https://byte-camp-auth-service.fly.dev;
|
|
|
|
|
|
|
|
|
|
# proxy_ssl_name byte-camp-auth-service.fly.dev; # <<<<< add this line
|
|
|
|
|
# proxy_ssl_server_name on;
|
|
|
|
|
|
|
|
|
|
# proxy_set_header Host byte-camp-auth-service.fly.dev;
|
|
|
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
|
|
|
|
|
# proxy_cookie_domain byte-camp-auth-service.fly.dev jank-frontend.fly.dev;
|
|
|
|
|
# proxy_cookie_path / /;
|
|
|
|
|
|
|
|
|
|
# proxy_pass_request_headers on;
|
|
|
|
|
# proxy_pass_request_body on;
|
|
|
|
|
# proxy_set_header Cookie $http_cookie;
|
|
|
|
|
|
|
|
|
|
# resolver 168.63.129.16 valid=10s;
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri /index.html;
|
|
|
|
|
}
|
2025-04-21 17:14:56 -07:00
|
|
|
}
|
2025-08-25 12:41:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# server {
|
|
|
|
|
# listen 8080;
|
|
|
|
|
# server_name localhost;
|
|
|
|
|
|
|
|
|
|
# root /usr/share/nginx/html;
|
|
|
|
|
# index index.html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# location / {
|
|
|
|
|
# try_files $uri $uri/ /index.html;
|
|
|
|
|
# }
|
|
|
|
|
# }
|