Skip to content

Commit

Permalink
Allow accessing the control pages of Pretix when it is in maintenance…
Browse files Browse the repository at this point in the history
… mode (#485)
  • Loading branch information
TobiasDeBruijn authored Dec 29, 2024
1 parent ac831af commit 3f70bc7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ansible/roles/pretix/templates/pretix_maintenance.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,33 @@ server {

root /var/www/pretix-maintenance;
index pretix-maintenance.html;

location /control {
proxy_pass http://localhost:8345;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
}

location /media/ {
alias /var/www/pretix/data/media/;
expires 7d;
}

location ^~ /media/cachedfiles {
deny all;
return 404;
}

location ^~ /media/invoices {
deny all;
return 404;
}

location /static/ {
alias /var/www/pretix/venv/lib/python3.8/site-packages/pretix/static.dist/;
access_log off;
expires 365d;
add_header Cache-Control "public";
}
}

0 comments on commit 3f70bc7

Please sign in to comment.