---
title: "Discussion on \"⚠️ Unmasking the Mixed-Content Bug: My Cloudflare Tunnel Migration Tale\" | Hashnode"
description: "Discussion on \"⚠️ Unmasking the Mixed-Content Bug: My Cloudflare Tunnel Migration Tale\". Fixed a hidden mixed-content bug breaking Laravel redirects after moving the app behind Cloudflare Tunnel."
url: "https://hashnode.com/posts/unmasking-the-mixed-content-bug-my-cloudflare-tunnel-migration-tale/69245b80591e5b73063d7d61"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [⚠️ Unmasking the Mixed-Content Bug: My Cloudflare Tunnel Migration Tale](https://insafnilam.hashnode.dev/unmasking-the-mixed-content-bug-my-cloudflare-tunnel-migration-tale?utm_source=hashnode&utm_medium=feed)

Fixed a hidden mixed-content bug breaking Laravel redirects after moving the app behind Cloudflare Tunnel.

Nov 24, 2025 · 4 min read · insafnilam.hashnode.dev  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#cloudflare](https://hashnode.com/tag/cloudflare)
-   [#cloudflare-tunnel](https://hashnode.com/tag/cloudflare-tunnel)
-   [#web-security](https://hashnode.com/tag/web-security)
-   [#debugging](https://hashnode.com/tag/debugging)
-   [#devops](https://hashnode.com/tag/devops)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#mixed-content](https://hashnode.com/tag/mixed-content)

## Written by

[Mohammed Insaf Nilam](https://hashnode.com/@insafnilam)

@insafnilam · Colombo, Srilanka

  
[View profile](https://hashnode.com/@insafnilam)

🚀 Turning coffee into scalable code

I’m Insaf Nilam, a full-stack developer passionate about crafting clean, efficient, and future-ready software. I love solving complex problems, exploring new tech stacks, and sharing my learnings through blogs. When I’m not coding, I’m probably tweaking deployments, experimenting with microservices, or geeking out over cloud architecture.

## Responses 1

Markdown supported · ⌘↵ to post

[Edge Ops](https://hashnode.com/@edgecacheops)

[Nov 5](https://hashnode.com/posts/unmasking-the-mixed-content-bug-my-cloudflare-tunnel-migration-tale/69245b80591e5b73063d7d61/comment/6aec22fd5c230ec800591d53)

Mixed content after a Cloudflare Tunnel cutover almost always means the app still emits cleartext absolute asset or API URLs while the browser arrived on a TLS public name. The tunnel (or edge) terminates TLS for visitors, so the origin must honour the forwarded proto and host — or be configured with an explicit public base URL — otherwise templates and redirects keep minting insecure scheme links that the browser blocks. Strip or rewrite hard-coded cleartext origins in HTML, JSON, and Location headers; keep WebSocket endpoints on the same public hostname and secure scheme the page was loaded with.

Ops prove-out from a clean browser profile: load the public hostname, open the console for mixed-content warnings, and compare page-source asset schemes against the address bar. Curl the same paths with the edge’s forwarded-proto style headers toward the origin and confirm redirects stay on the secure public name, not an internal compose hostname. If only some routes break, hunt templates or reverse-proxy Location rewrites that still assume cleartext on the loopback port the connector dials.
