mirror of
https://github.com/ArcticFoxes-net/Synapse-Docker-Compose.git
synced 2024-09-28 21:35:39 +00:00
Add Mjolnir reverse proxy
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
20524a1cad
commit
3a5e9979b0
@ -20,6 +20,23 @@ server {
|
|||||||
# enable for Authelia
|
# enable for Authelia
|
||||||
#include /config/nginx/authelia-server.conf;
|
#include /config/nginx/authelia-server.conf;
|
||||||
|
|
||||||
|
location ~ ^/_matrix/client/r0/rooms/([^/]*)/report/(.*)$ {
|
||||||
|
# Abuse reports should be sent to Mjölnir.
|
||||||
|
|
||||||
|
# Add CORS, otherwise a browser will refuse this request.
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always; # Note: '*' is for testing purposes. For your own server, you probably want to tighten this.
|
||||||
|
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://mjolnir:8082/api/1/report/$room_id/$event_id;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# enable the next two lines for http auth
|
# enable the next two lines for http auth
|
||||||
#auth_basic "Restricted";
|
#auth_basic "Restricted";
|
||||||
|
Loading…
Reference in New Issue
Block a user