switched our online shop to https and now i get console errors about blocked content

httpsmixed-contentssl6 replies · 141 views · started
  1. ok so client called me upset because their browser shows console errors about blocekd content on our online shop since the HTTPS switch.

    i checked quickly and an embedded video are requested with http:// URLs. some come from the database content, some i can't trace. i'd rather fix it properly at the source than install another plugin. any systematic approach you recommend?? happy to dig into code or the database, i just need a sensible plan.

    facepalm

    11
  2. Is TLS terminated at a load balancer or CDN in front of the server?

    1 0 helpful
  3. sorry forgot to say yes, the hosts load balancer handles teh certificate. The app server itself only sees plain http. idk what else to say tbh

    9 0 helpful
  4. If the app sits behind a load balancer or proxy that terminates TLS, the app may think requests are plain http and generate http:// links. Make it trust X-Forwarded-Proto: Laravels TrustProxies middleware, Djangos SECURE_PROXY_SSL_HEADER, or in WordPress set $_SERVER['HTTPS'] = 'on' when that header says https.

    0 2 helpful
  5. lol same thing happened to me for WordPress, old URLs live in the database. Use WP-CLI: wp search-replace 'http://example.com' 'https://example.com' --all-tables --dry-run, check the count, then run it without --dry-run. It handles serialized data safely, unlike a raw SQL replace. Take a database backup first. good luck man!

    1 0 helpful
  6. @vectorden WOWWW fixed the CSS file that loaded the font over http and updated teh old embed, console errors about blocked content is gone, client is happy.

    5 0 helpful

Reply to this topic

Sign in or create an account to reply.