1
0
mirror of https://github.com/ArcticFoxes-net/Synapse-Ubuntu-ZFS synced 2024-12-22 15:41:35 -05:00
Synapse-Ubuntu-ZFS/etc/nginx/conf.d/synapse.conf

38 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-08-25 16:17:37 -04:00
server {
listen 443 ssl;
listen [::]:443 ssl;
# For the federation port
listen 8448 ssl;
listen [::]:8448 ssl;
server_name matrix.arcticfoxes.net;
include /etc/nginx/ssl.conf;
include /etc/nginx/proxy.conf;
include /etc/nginx/headers.conf;
client_max_body_size 0;
location ~ ^/_matrix/client/r0/rooms/([^/]*)/report/(.*)$ {
# Abuse reports should be sent to Mjölnir.
# Add CORS, otherwise a browser will refuse this request.
include /etc/nginx/headers.conf;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
add_header 'Access-Control-Max-Age' 1728000; # cache preflight value for 20 days
# Alias the regexps, to ensure that they're not rewritten.
set $room_id $1;
set $event_id $2;
proxy_pass http://127.0.0.1:8081/api/1/report/$room_id/$event_id;
}
location / {
2023-09-08 17:38:07 -04:00
proxy_pass http://unix:/var/lib/matrix-synapse/matrix-synapse.sock:;
2023-08-25 16:17:37 -04:00
}
}