mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
66 lines
2.1 KiB
Nginx Configuration File
66 lines
2.1 KiB
Nginx Configuration File
events {}
|
||
|
||
http {
|
||
client_max_body_size 20G;
|
||
ignore_invalid_headers off;
|
||
|
||
server {
|
||
listen 80;
|
||
|
||
# TUS uploads – zero buffering
|
||
# location /tus/ {
|
||
# proxy_pass http://127.0.0.1:1080/;
|
||
# # proxy_request_buffering off;
|
||
# # proxy_buffering off;
|
||
# # proxy_http_version 1.1;
|
||
location /tus/ {
|
||
# rewrite ^/tus/(.*)$ /$1 break;
|
||
# proxy_pass http://127.0.0.1:1080/;
|
||
# proxy_request_buffering off;
|
||
# proxy_buffering off;
|
||
# proxy_http_version 1.1;
|
||
proxy_pass http://127.0.0.1:1080/tus/;
|
||
|
||
proxy_pass_request_headers on;
|
||
|
||
# proxy_set_header Host $host;
|
||
# proxy_set_header X-Forwarded-Host $host;
|
||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
# Disable request and response buffering
|
||
proxy_request_buffering off;
|
||
proxy_buffering off;
|
||
proxy_http_version 1.1;
|
||
# Add X-Forwarded-* headers
|
||
|
||
proxy_set_header Host $http_host;
|
||
proxy_set_header X-Forwarded-Host $http_host;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
||
|
||
# proxy_set_header X-Forwarded-Host $host:$server_port;
|
||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
||
proxy_set_header Upgrade $http_upgrade;
|
||
proxy_set_header Connection "upgrade";
|
||
# # proxy_set_header Connection "";
|
||
client_max_body_size 0;
|
||
}
|
||
|
||
# Next.js
|
||
location / {
|
||
proxy_pass http://127.0.0.1:3000;
|
||
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Upgrade $http_upgrade;
|
||
proxy_set_header Connection "upgrade";
|
||
|
||
proxy_set_header Host $http_host;
|
||
proxy_set_header X-Forwarded-Host $http_host;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
}
|
||
}
|
||
}
|