fix: Nginx Fix

This commit is contained in:
Danny 2026-01-09 12:02:17 -06:00
parent cd367e7cfd
commit 965a63c5ff
1 changed files with 13 additions and 30 deletions

View File

@ -1,37 +1,20 @@
# Standard Nginx top-level config server {
user nginx; listen 80;
worker_processes auto; server_name _;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events { # These settings are allowed inside a 'server' block
worker_connections 1024; # and will handle the large IAP JWT headers.
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# --- THE FIX STARTS HERE ---
# These MUST be in the http block to handle the IAP header early
client_header_buffer_size 64k; client_header_buffer_size 64k;
large_client_header_buffers 4 64k; large_client_header_buffers 4 64k;
# --- THE FIX ENDS HERE ---
sendfile on; root /usr/share/nginx/html;
keepalive_timeout 65; index index.html;
server { location / {
listen 80; try_files $uri $uri/ /index.html;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
# Ensure headers are passed correctly
proxy_set_header Host $host;
}
} }
# This helps us see errors in Cloud Run logs if it still fails
error_log /dev/stdout info;
access_log /dev/stdout;
} }