Navigation Failed Because The Request Was For An Http Url With Https-only Enabled Instant
Add this header to your server (Apache/NGINX):
HTTPS-Only mode forces the browser to automatically upgrade every request to HTTPS. If the upgrade fails (or if you explicitly hardcode http:// ), the browser throws an error instead of falling back to unsafe HTTP. You cannot fix this by telling your users to turn off HTTPS-Only mode. Instead, you need to fix your code or infrastructure. Fix 1: Use Protocol-Relative or Absolute HTTPS URLs (The Easiest) Never hardcode http:// or https:// in your frontend code. Use protocol-relative URLs (starting with // ) or absolute paths. Add this header to your server (Apache/NGINX): HTTPS-Only
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload Once the browser sees this header, it will automatically convert all future http:// requests to https:// before they are sent, eliminating the error. Sometimes you cannot control the external API—maybe a legacy vendor only serves HTTP. In this case, do not call the HTTP endpoint directly from the browser. Call your own HTTPS backend, and let your server proxy the request to the HTTP vendor. Instead, you need to fix your code or infrastructure
fetch('http://mybackend.com/api/data'); <img src="http://cdn.example.com/logo.png"> Call your own HTTPS backend
The “Navigation Failed” Paradox: Debugging HTTP Requests in an HTTPS-Only World