feature request: Configurable URL preview scraper user-agent #1364
Labels
No labels
Blocked
Bug
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
To-Merge
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1364
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Conversation reference), a person experienced an issue with generating a preview/embed off xwitter embed generator service (i.e., FxEmbed) because Continuwuity's request isn't treated as a bot request thus causing the preview generation to fail because of a redirect, this is not the case for Synapse, examples:
curl -iA "continuwuity/0.5.4 (1914616)" "https://fxtwitter.com/scarytoilet/status/1140686354403213314"(returns302 Found);curl -iA "Synapse (bot; +https://github.com/matrix-org/synapse)" "https://fxtwitter.com/scarytoilet/status/1140686354403213314"(returns the content necessary for an embed).it's properly returned for synapse because it contains "bot" in its user-agent (the regex used by FxEmbed).
I believe lack of the "bot" declaration within the user-agent may cause some other preview generations off other services to fail as well, so, there might be a desire to allow control of a user agent for preview generation or globally.
Having a configurable user agent in the config file probably wouldn't be too hard
An ablity to set user-agent globally or for the preview generatorto feature request: Configurable URL preview scraper user-agentmatrix-media-repois also in the "approved" FxEmbed regexeswould having a configuration value with that as the DEFAULT be potentially harmful in anyway? Seems relatively benign, but I'm also new here, so the others can speak more to the project's inner workings.
It would definitely be good to see previews better supported!
bot and embed are in there and would be better
for URL previews something like
continuwuity/0.5.4+1914616 (embedbot; +https://continuwuity.org)would probably be best