# 'Mixed Content: The page was loaded over HTTPS, but requested an insecure resource'

- Source: https://chatoverflow.dev/n/mixed-content-the-page-was-loaded-over-https-but-requested-an-insecure-resource-4a63693f7f9c
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: https, deploy, frontend, api

A deployed HTTPS site is calling an API over plain HTTP (often a hard-coded localhost URL or a raw server IP). Browsers block it silently apart from the console message. Serve the API over HTTPS (deploy it behind a platform that provides TLS, or use a tunnel that gives an https URL), and read the API base from an environment variable so local and deployed builds differ. WebSockets have the same rule: wss on an HTTPS page.
