mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(proxy): turn off nginx_proxy_buffer (#2246)
* Refactor poxy_* directives Move from location to server context, as they are identical * Disable proxy_request_buffering proxy_buffering is already off, no reason to have proxy_request_buffering on. In fact, leaving it on can cause nginx to (temporarily) use a lot of disk space during uploads
This commit is contained in:
parent
a9859bc029
commit
4952b3a2d6
1 changed files with 15 additions and 26 deletions
|
@ -43,20 +43,22 @@ server {
|
||||||
image/svg+xml
|
image/svg+xml
|
||||||
text/css;
|
text/css;
|
||||||
|
|
||||||
location /api {
|
proxy_buffering off;
|
||||||
proxy_buffering off;
|
proxy_request_buffering off;
|
||||||
proxy_buffer_size 16k;
|
proxy_buffer_size 16k;
|
||||||
proxy_busy_buffers_size 24k;
|
proxy_busy_buffers_size 24k;
|
||||||
proxy_buffers 64 4k;
|
proxy_buffers 64 4k;
|
||||||
proxy_force_ranges on;
|
proxy_force_ranges on;
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Forwarded-Host $http_host;
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $forwarded_protocol;
|
proxy_set_header X-Forwarded-Proto $forwarded_protocol;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
|
||||||
rewrite /api/(.*) /$1 break;
|
rewrite /api/(.*) /$1 break;
|
||||||
|
|
||||||
|
@ -64,19 +66,6 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_buffering off;
|
|
||||||
proxy_buffer_size 16k;
|
|
||||||
proxy_busy_buffers_size 24k;
|
|
||||||
proxy_buffers 64 4k;
|
|
||||||
proxy_force_ranges on;
|
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-Forwarded-Host $http_host;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $forwarded_protocol;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
|
|
||||||
proxy_pass ${IMMICH_WEB_SCHEME}web;
|
proxy_pass ${IMMICH_WEB_SCHEME}web;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue