Comment out Mjolnir abuse reports

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2022-09-07 15:09:56 -04:00
parent 96fc04e271
commit 1e472ff175
No known key found for this signature in database
GPG Key ID: 060B29EB996BD9F2
2 changed files with 12 additions and 11 deletions

View File

@ -17,4 +17,4 @@ Matrix Synapse Docker-Compose
5. Copy the config from https://github.com/matrix-org/pantalaimon to `./pantalaimon/pantalaimon.conf` and edit it accordingly
6. Run `docker-compose up` and make sure nothing errors out. You can use `docker-compose up -d` to start it in the background if you want.
7. Create a user for mjolnir
8. Copy the config from https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml to `./mjolnir/config/production.yaml` and edit it accordingly. If you want to enable the abuse report API, make it listen on `0.0.0.0:8081`.
8. Copy the config from https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml to `./mjolnir/config/production.yaml` and edit it accordingly. If you want Mjolnir to recieve reports instead of Synapse, make it listen on `0.0.0.0:8081`. You will also need to uncomment the approprieate lines in `./swag/nginx/proxy-confs/synapse.subdomain.conf` as well.

View File

@ -20,21 +20,22 @@ server {
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location ~ ^/_matrix/client/r0/rooms/([^/]*)/report/(.*)$ {
# Uncomment the following block if you want Mjolnir to recieve reports instead of Synapse.
#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-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
#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:8081/api/1/report/$room_id/$event_id;
}
#set $room_id $1;
#set $event_id $2;
#proxy_pass http://mjolnir:8081/api/1/report/$room_id/$event_id;
#}
location / {
# enable the next two lines for http auth