SupabaseS
Supabase6mo ago
Raz

Supabase Edge Function returns HTML as source code (Content-Type issue) instead of rendering page

I’m running into a frustrating issue with a Supabase Edge Function (Deno/TypeScript) that’s supposed to serve a phishing simulation login page as HTML. Instead of rendering the page, browsers display the raw HTML source code.
My Edge Function returns a string of valid HTML (tested and renders fine if saved as a .html file).
I’m returning the response like this you can see screenshot 1st , : , But now, when I open the phishing link, it shows the HTML source code instead of rendering the phishing page (check screenshot 2 ). After checking the response headers, I noticed the Content-Type is set to text/plain, not text/html (check screenshot 3rd ). Can someone please help me figure this out?
Screenshot_2025-07-20_220849.png
Screenshot_2025-07-20_205317.png
Screenshot_2025-07-20_210250.png
Was this page helpful?