mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-23 18:29:23 -05:00
36 lines
902 B
Plaintext
36 lines
902 B
Plaintext
server {
|
|
listen ${TANDOOR_PORT};
|
|
listen [::]:${TANDOOR_PORT} ipv6only=on;
|
|
server_name localhost;
|
|
|
|
client_max_body_size 512M;
|
|
|
|
# serve media files
|
|
location /media {
|
|
alias ${MEDIA_ROOT};
|
|
add_header Content-Disposition 'attachment; filename="$args"';
|
|
}
|
|
|
|
# serve service worker under main path
|
|
location = /service-worker.js {
|
|
alias ${STATIC_ROOT}/vue3/service-worker.js;
|
|
}
|
|
|
|
# pass requests for dynamic content to gunicorn
|
|
location / {
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://unix:/run/tandoor.sock;
|
|
|
|
# param needed by django allauth sessions to log IP
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# disabled for now because it redirects to the error page and not back, also not showing html
|
|
#error_page 502 /errors/http502.html;
|
|
}
|
|
|
|
location /errors/ {
|
|
alias /etc/nginx/http.d/errorpages/;
|
|
internal;
|
|
}
|
|
}
|