fix: Nginx Fix
This commit is contained in:
parent
8350b67a31
commit
cd367e7cfd
42
nginx.conf
42
nginx.conf
|
|
@ -1,15 +1,37 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
# Standard Nginx top-level config
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
# Increase buffer size to handle large IAP JWT headers
|
||||
client_header_buffer_size 4k;
|
||||
large_client_header_buffers 4 16k;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
# --- THE FIX STARTS HERE ---
|
||||
# These MUST be in the http block to handle the IAP header early
|
||||
client_header_buffer_size 64k;
|
||||
large_client_header_buffers 4 64k;
|
||||
# --- THE FIX ENDS HERE ---
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue