matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

Draupnir proxy

Open Chasethechicken opened this issue 1 year ago • 1 comments

Mjolnir / Draupnir can receive abuse reports in the management room.

There are two options to configure this:

  1. Poll reports from the admin-API
  2. Redirect the endpoint to the draupnir container using a reverse proxy

The second option seems to be the preferred one.

This PR configures the MDAD-managed traefik to proxy the relevant requests to Draupnir (the second option). To enable it set matrix_bot_draupnir_abuse_reporting_enabled: true.

If this gets merged I'd be willing to create a PR adding the same options for Mjolnir, which should more or less be a big find and replace.

Chasethechicken avatar May 12 '24 09:05 Chasethechicken

Thank you for working on this feature!

I've posted some feedback to improve consistency and simplify some things.

spantaleev avatar May 13 '24 13:05 spantaleev

Sorry about taking so long, things got in the way and I kind of forgot about this. This is my first contribution to MDAD, so your feedback is very much appreciated.

I think this should address all of your points, let me know if there is still something left to improve.

Also, do you want me to rebase this into a few nicer commits or are you going to squash this into one commit anyway?

Chasethechicken avatar Jul 06 '24 11:07 Chasethechicken

Sure! Thanks for soldiering on and perfecting this! I can squash-merge when ready, so it's up to you if you'd like to clean up by rebasing explicitly or not.

spantaleev avatar Jul 08 '24 04:07 spantaleev

I have renamed the variable back to matrix_bot_draupnir_abuse_reporting_enabled. I have also rebased this into 2 commits, so I think this is ready now.

Chasethechicken avatar Jul 08 '24 08:07 Chasethechicken

@spantaleev I implemented all your suggestions. Is there still something I can improve? If you just did not get around to reviewing this yet, then no worries.

Chasethechicken avatar Aug 05 '24 16:08 Chasethechicken