VibeSecurity

Security check

Mixed content and HTTPS: making every request encrypted

If an HTTPS page loads a script, image or API over plain HTTP, an attacker on the network can tamper with it. Browsers block much of this, but leftovers still cause broken pages and downgrade risks.

By the VibeSecurity team1 min read

Find http:// leftovers

  • Search your code and content for http:// links to your own assets and APIs.
  • Open the browser console on each key page and read mixed-content warnings.
  • Check environment variables such as an API base URL that still points at http.

Enforce HTTPS

Response headers
Strict-Transport-Security: max-age=63072000; includeSubDomains
Content-Security-Policy: upgrade-insecure-requests

Redirects and cookies

  • Redirect every http:// request to https:// at your host or CDN.
  • Mark cookies Secure so they are never sent over plain HTTP.
  • Add includeSubDomains to HSTS only when all subdomains support HTTPS.

Frequently asked questions

Should I add my site to the HSTS preload list?

Only after HSTS has worked for a while on every subdomain, because removal from the list is slow.

Sources

  1. 1.MDN: Mixed content
  2. 2.MDN: Strict-Transport-Security