fix: Nginx Fix
This commit is contained in:
parent
cd367e7cfd
commit
965a63c5ff
43
nginx.conf
43
nginx.conf
|
|
@ -1,37 +1,20 @@
|
|||
# Standard Nginx top-level config
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
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
|
||||
# These settings are allowed inside a 'server' block
|
||||
# and will handle the large IAP JWT headers.
|
||||
client_header_buffer_size 64k;
|
||||
large_client_header_buffers 4 64k;
|
||||
# --- THE FIX ENDS HERE ---
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
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;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# This helps us see errors in Cloud Run logs if it still fails
|
||||
error_log /dev/stdout info;
|
||||
access_log /dev/stdout;
|
||||
}
|
||||
Loading…
Reference in New Issue