Skip to content
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

have a separate setting for internal/external URL #154

Closed
rubo77 opened this issue Sep 5, 2016 · 2 comments
Closed

have a separate setting for internal/external URL #154

rubo77 opened this issue Sep 5, 2016 · 2 comments

Comments

@rubo77
Copy link
Contributor

rubo77 commented Sep 5, 2016

If you upload an image, it uses the homeserver url for the IRC side of it, which makes sense until that is "localhost:8008" :/

@rubo77
Copy link
Contributor Author

rubo77 commented Sep 20, 2016

lukeb suggests to add a new item into config.yaml, which is an option that allows for an alternative URL for media downloads
(something like media_url)
Then you'll need to thread this through the code until it reaches here : https://github.com/matrix-org/matrix-appservice-irc/blob/master/lib/models/MatrixAction.js#L48 at which point you can use getHttpUriForMxc(media_url, event.content.url) instead of what is already there

You will also need to require getHttpUriForMxc from the package it is within (which is ContentRepo of require('matrix-js-sdk'))
https://github.com/matrix-org/matrix-js-sdk/blob/d9318a60e41578674ff900d2c77b4bb39dff88fe/lib/content-repo.js#L37

If media_url is not provided, it should just fall back onto the HS URL

@Mikaela
Copy link
Contributor

Mikaela commented Oct 15, 2016

This issue possibly includes matrix.org using http for media URLs instead of https?

It looks like HTTPS Everywhere has a rule for Matrix.org, but that only protects HTTPS Everywhere users and even having HSTS (which matrix.org doesn't have) wouldn't protect smaller browsers that don't have HSTS preload list if they never accessed matrix.org over https which is less likely with all media links being http.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants