-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images are bridged to IRC as URLs which force a download #257
Comments
It's a synapse regression matrix-org/synapse#15885, so I'd hope they fix it there |
Unfortunately the consensus in matrix-org/synapse#15885 seems to be that the bridge should figure out how to serve content independently :( Just to play with the idea, would there be any other benefit in heisenbridge serving content directly? It's really not a common IRC bouncer use case... |
There is a Synapse PR to revert it for some basic types:
Well, it will need to do that anyway to support encrypted rooms. |
One fairly easy hack is to run a separate reverse proxy just for Heisenbridge and set its |
Looks like this was resolved, I checked after nginx-proxy was ripped from the ansible playbook and I don't hit it anymore. It may have also been fixed by the referenced synapse bug. |
I confirm it was fixed before. I also use the ansible playbook, and I have not updated yet (I have traefik in front, but nginx is still behind, so the default config until yesterday). |
Messages with
"msgtype": "m.image"
are sent to IRC with an URL such ashttps://matrix.example.com/_matrix/media/r0/download/matrix.org/xxxxxxxxxxxxxxxxxxxxxxxx/image.png
. However, Synapse serves these endpoints withContent-Disposition: attachment; filename=image.png
. This instructs web browsers to offer to save the image to disk, instead of simply displaying it.This makes it annoying for IRC users to see images posted by Matrix users.
#227 looks related.
As to how this could be fixed... first, the spec doesn't seem to require any particular
Content-Disposition
header, nor does it offer any way for clients to request a particular content-disposition. So, Synapse seems to be sending the header on its own volition. Changing this in Synapse might be an option, but another way would be to try to fix this together with #227, which will probably require Heisenbridge to run its own HTTP server. Integrated setups such as https://github.com/spantaleev/matrix-docker-ansible-deploy could simplify setup and configure routes to Heisenbridge's HTTP server without requiring significant effort from users. I see Heisenbridge already uses asynchronous I/O, so maybe throwing in an HTTP server would not be a significant ordeal?The text was updated successfully, but these errors were encountered: