Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

HTTPS for images

Open rawsh opened this issue 9 years ago • 13 comments

Something that really annoys me when trying to get my posts to work with https is that dragging an image into the ghost editor will automatically point to the http version of the image. This means that my page is only partially secure, and to fix it I have to go through every image.

rawsh avatar Jun 13 '17 02:06 rawsh

Hey @rawsh! Sorry to hear that you're having trouble.

Are you experiencing this with Ghost 0.11.x or 1.0.0 alpha/beta?

aileen avatar Jun 13 '17 03:06 aileen

@AileenCGN Sorry, that should have been in the first post.

0.11.7

rawsh avatar Jun 14 '17 13:06 rawsh

@AileenCGN Hi, I encountered a similar problem. Ghost version:1.0 beta

I have configured the SSL certificate, but found that the ghost backstage page include HTTP resources.http://mydomain.com/content/images/2017/06/icon.ico?t=1497630662935 Icon.ico is the Publication icon that I uploaded, and the default favicon.ico is also HTTP resources.

chanssl avatar Jun 16 '17 16:06 chanssl

I'm wondering, if this is related to https://github.com/TryGhost/Ghost/issues/8372

aileen avatar Jun 22 '17 08:06 aileen

I've got the same after logging in to admin panel:

Mixed Content: The page at 'https://www.mydomain.pl/ghost/#/signin' was loaded over HTTPS, but requested an insecure image 'http://mydomain.pl/favicon.ico?t=1498124680075'. This content should also be served over HTTPS.

It's beta1.0

PaszaVonPomiot avatar Jun 22 '17 09:06 PaszaVonPomiot

Hey @PaszaVonPomiot!

~I'm not able to reproduce your issue. Would you mind, sharing some further information about this?~

nvm, l can reproduce it now. When Ghost is running on HTTPS, I can see the logs:

image

I will investigate and open a different issue eventually, if this turns out to be not related to this issue.

aileen avatar Jun 22 '17 11:06 aileen

@AileenCGN Can confirm. Seeing this warning as well.

kirrg001 avatar Jun 23 '17 08:06 kirrg001

I will investigate and open a different issue eventually, if this turns out to be not related to this issue.

@AileenCGN Could you find out anything?

kirrg001 avatar Jul 14 '17 10:07 kirrg001

@rawsh I can't reproduce what you are experiencing with the latest LTS release. Can you please update to the latest LTS release and report back?

kirrg001 avatar Jul 14 '17 11:07 kirrg001

FYI: The favicon warning for Ghost 1.0 happens, if the blog frontend is configured as HTTP (url property in your config is HTTP), but the admin panel is served via HTTPS (adminUrl property is HTTPS).

Mixed Content: The page at 'https://www.mydomain.pl/ghost/#/signin' was loaded over HTTPS, but requested an insecure image 'http://mydomain.pl/favicon.ico?t=1498124680075'. This content should also be served over HTTPS.

If you configure this right, you won't see the warning anymore. The warning can't be avoided for running the frontend on HTTP i guess, because the admin panel requests the favicon from the Ghost frontend.

kirrg001 avatar Jul 14 '17 11:07 kirrg001

If you configure this right, you won't see the warning anymore. The warning can't be avoided for running the frontend on HTTP i guess, because the admin panel requests the favicon from the Ghost frontend.

Correct, I think this is one of those situations which we can't easily prevent - we can't force the request to be HTTPS because whether HTTPS works or not for the frontend is outside of Ghost's control. There may be a workaround where we don't rely on favicon.ico and use the settings api with fallback to a Ghost-Admin asset but I think that deserves it's own issue if it's something we want to pursue.

For now if anyone runs into favicon.ico mixed-content warning and they want to fix it the correct solution is configure the front-end to be served over HTTPS.

kevinansfield avatar Jul 14 '17 13:07 kevinansfield

I can confirm that this solution works. Previously (in one of betas) when I put https in "url" ghost didn't work properly. Now it does. Thanks!

PaszaVonPomiot avatar Jul 14 '17 22:07 PaszaVonPomiot

I don't think there's anything to fix here. Will reopen if anyone can provide an example of a broken case in 1.0.

ErisDS avatar Oct 18 '17 18:10 ErisDS