diff --git a/README.md b/README.md index 1c656a1..226bee0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/swag/nginx/proxy-confs/synapse.subdomain.conf b/swag/nginx/proxy-confs/synapse.subdomain.conf index 8fb1acb..11f2e8c 100644 --- a/swag/nginx/proxy-confs/synapse.subdomain.conf +++ b/swag/nginx/proxy-confs/synapse.subdomain.conf @@ -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