Skip to content

Discord uses the wrong user-agent when fetching URL/File previews #1600

@meme-lord

Description

@meme-lord

Steps to Reproduce:

  • Set up a webserver
  • Put an image file on it
  • Link the image on discord
  • Monitor the requests

Expected Result: All the requests to generate a preview use the Discordbot user-agent

Actual Result: Only the first request has the Discordbot user-agent Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com), the ones after that are Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0 which seems very arbitrary.

The second useragent should either be the same or include Discordbot in it so that you can tell its discord or not a web browser.

I also think it shouldn't need more than one request to generate a preview and a lot of bandwidth is being wasted 👀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions