DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Images over https

 3 Replies
 1 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 14
New Around Here

Hiya
I have just set up a LetsEncrypt cert on a dnn8 site.
Things work as expected except any images in html modules which seem to be fetched over http resulting in the "Not secure" chrome warning.  (Grrr)
Does anyone know a remedy please.  
Thanks

DNN user since v3
Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!

Betacam,

You have different options. One could be to replace all occurences of "http://www.mysite.com/" by "https://www.mysite.com/" in the HTML modules using SQL, something like

  UPDATE HtmlText
  SET Content = REPLACE(Content, 'http://www.mysite.com/', 'https://www.mysite.com/')
  WHERE Content LIKE '%http://www.mysite.com/%'

Or, even better, get rid of the protocol and server part:

  UPDATE HtmlText
  SET Content = REPLACE(Content, 'http://www.mysite.com/', '/')
  WHERE Content LIKE '%http://www.mysite.com/%'

This could be a pain, esp. if you have other modules than HTML that display such images, or use links to stylesheets or Javascripts etc. with this syntax.

The better way would be to implement a Content Security Policy, there you have the option to upgrade insecure requests by the browser automatically (will not work in really old browsers, but they don't care about mixed content anyway...)

See

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

DNN Connect
New Around Here
Posts: 14
New Around Here
Hello Michael
Many thanks for the ideas / options in your reply. I now have a starting point.
Thank you
DNN user since v3
Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
Betacam,

you're welcome, I am glad I could help. What I should mention: After touching the database you should restart the application pool. Otherwise you could get cached data, and your changes could not be reflected on the web site.

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

DNN Connect

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved