mirror of
https://github.com/Screenly/Anthias.git
synced 2026-04-30 11:24:31 -04:00
* chore(deps): bump django from 3.2.18 to 4.2.16 in /requirements Bumps [django](https://github.com/django/django) from 3.2.18 to 4.2.16. - [Commits](https://github.com/django/django/compare/3.2.18...4.2.16) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * fix: fix CSRF issues caused by upgrade from Django 3 to 4 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: nicomiguelino <nicomiguelino2014@gmail.com>
79 lines
1.8 KiB
Plaintext
79 lines
1.8 KiB
Plaintext
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
|
|
upstream anthias {
|
|
server anthias-server:8080;
|
|
}
|
|
|
|
upstream websocket {
|
|
server anthias-websocket:9999;
|
|
}
|
|
|
|
server {
|
|
server_tokens off;
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
location / {
|
|
|
|
proxy_pass http://anthias;
|
|
|
|
client_max_body_size 4G;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host anthias-server;
|
|
proxy_set_header Origin http://anthias;
|
|
}
|
|
|
|
location ~ ^/api/[0-9a-z]+/backup$ {
|
|
proxy_pass http://anthias;
|
|
proxy_connect_timeout 1800;
|
|
proxy_send_timeout 1800;
|
|
proxy_read_timeout 1800;
|
|
send_timeout 1800;
|
|
|
|
client_max_body_size 4G;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host anthias-server;
|
|
}
|
|
|
|
location /static {
|
|
proxy_pass http://anthias/static;
|
|
}
|
|
|
|
location /ws {
|
|
proxy_pass http://websocket;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
location /screenly_assets {
|
|
allow 172.16.0.0/12;
|
|
deny all;
|
|
|
|
alias /data/screenly_assets;
|
|
}
|
|
|
|
location /static_with_mime {
|
|
allow 10.0.0.0/8;
|
|
allow 172.16.0.0/12;
|
|
allow 192.168.0.0/16;
|
|
deny all;
|
|
|
|
alias /data/screenly/staticfiles;
|
|
}
|
|
}
|
|
|
|
server {
|
|
# Only allow from localhost and Docker's CIDR
|
|
allow 172.16.0.0/12;
|
|
allow 172.0.0.1;
|
|
deny all;
|
|
|
|
server_name *.ngrok.io;
|
|
listen 80;
|
|
root /data/screenly_assets;
|
|
try_files $uri /data/screenly_assets$uri;
|
|
}
|