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

Images not previewing in Discord when using SSL (LetsEncrypt/Certbot certificate) #45

Open
mangosd1337 opened this issue Aug 14, 2020 · 9 comments
Labels
Invalid Seems like a Non-issue Question Further information is requested

Comments

@mangosd1337
Copy link

mangosd1337 commented Aug 14, 2020

Basically title.
I tried a few different servers, domains and certificates now.
As soon as you swap from http to https the image previews in Skype, Telegram, Twitter and a few others when the link is posted, just Discord decides to not preview it. Clicking the link displays the image/video/text just fine.

Using Certbot to generate certificates for domain.com and *.domain.com

If "secure": is set to false it works and previews.

Domains tested on: https://valorant.dev and https://files.mango.sd. (both are set to public)

Tested with Ubuntu 16.04 and 20.04.

If this is an error on the ShareX Upload Server side it would be wonderful if it could be fixed.

Edit: example config (currently the one from https://valorant.dev
Edit2: Neither Nginx nor Apache are running on those servers, its just the ShareX Server

{
  "key": [""],
  "domain": "valorant.dev",
  "puploadKeyGenLength": 64,
  "public": true,
  "maxUploadSize": 50,
  "markdown": true,
  "port": 80,
  "secure": true,
  "fileNameLength": 4,
  "shortUrlLength": 3,
  "securePort": 443,
  "ratelimit": 1000,
  "dateURLPath": false,
  "allowed":[
    "png", "jpg", "gif", "mp4", "mp3", "jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv"
  ],
  "admin":{
    "key": ["admin pass key goes here"],
    "maxUploadSize": 1024,
    "allowed": [
    "png", "jpg", "gif", "mp4", "mp3","jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv", "html"
     ]
  },
  "paste": {
    "maxUploadSize": 20
  },
  "discordToken": "Discord Token Here (required if you want API monitoring through Discord)",
  "discordAdminIDs": ["discord IDs of people who can run commands go here", "Like this"],
  "discordChannelID": "the channel you're trying to send api monitor updates to",
  "prefix": "enter prefix for bot commands here"
}

@TannerReynolds
Copy link
Owner

Discord could definitely be doing some weird stuff. If it stopped how things previewed on multiple different services I'd begin to think that its a ShareS issue, but other services and your web browser can clearly get the image data. Discord should have no problem getting this data so this is an issue with them

@TannerReynolds
Copy link
Owner

If you could supply me an example link to an image that doesnt preview, I could try to get this resolved with Discord

@TannerReynolds TannerReynolds added Invalid Seems like a Non-issue Question Further information is requested labels Aug 15, 2020
@mangosd1337
Copy link
Author

Absolutely, one moment.
https://files.mango.sd/2020/08/15/hBPw
The picture above previews in Skype, Telegram and on Twitter.
Not in discord tho.

A friend (who knows way more about JS stuff than i do) was looking at it and couldnt really find any issue.

I have now set up my second domain https://valorant.dev/ using Nginx as a Reverse Proxy and now it previews on this domain.
It seems to be an issue related to the https package.

@mangosd1337
Copy link
Author

Hi,
did Discord respond yet?

@TheCuteFoxxy
Copy link

As far as I can tell from experience, Discord does some weird stuff with it. When using Cloudflare it works perfectly fine but if I setup my DNS Through my website provider, Discord fails to display. Could potentially be due to IP Reputation as well.

@Nuckerr
Copy link

Nuckerr commented Sep 1, 2021

Im having similar issues. I am running this in unsecure (http) and then using a cloudflare certificate and nginx reverse proxy to have https routes to my sharex uploader. I can go through to it fine in https and view the image fine however, in discord it dosent embed. I tried editing the code to make sure the protocol for sharex was https so that there wernt any redirects however, it still didnt embed. Even with .png on the end,

@TheCuteFoxxy
Copy link

@Nuckerr Does cloudflare handle your DNS for your domain?

@Nuckerr
Copy link

Nuckerr commented Sep 2, 2021

@Nuckerr Does cloudflare handle your DNS for your domain?

Yes, and the ssl certificates

@NightwalkerLots
Copy link

This would be a sharex thing. As my SC no longer works either. I put the link it generates into a browser and it no longer loads the page to show me my SC anymore. Not sure if there is a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Seems like a Non-issue Question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants