News for hackers. Stuff that matters.
Re:Instagram's URL Blackhole by est on Saturday February 14, 2026 @11:15PM (#47021004)
It's fun and all, is there a way to safely host .html but does not allow rendering it?

CORS? sec-fetch-dest, sec-fetch-mode and sec-fetch-site ?

If storage.googleapis.com weren't operated by Google, the domain would be blocked by Google's "Safe Browsing" long time ago.

Re:Instagram's URL Blackhole by kccqzy on Sunday February 15, 2026 @12:13AM (#47021250)
> If storage.googleapis.com weren't operated by Google, the domain would be blocked by Google's "Safe Browsing" long time ago.

Not true. You just need to make it an eTLD by adding it to the public suffix list. Only subdomains of domains on the PSL can be marked by Google’s Safe Browsing.

Re:Instagram's URL Blackhole by gruez on Saturday February 14, 2026 @11:22PM (#47021034)
Serve it with content-type set to text/plain and browsers won't try to render it. You can try a random html file on github. If you click raw it'll get rendered as text.
Re:Instagram's URL Blackhole by svens_ on Sunday February 15, 2026 @03:34AM (#47022046)
This assumption has unfortunately led to countless security issues, at least in the past. The nosniff header (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/...), was created because of this and should be added.

While this probably works, you should also add a restrictive CSP (using the sandbox directive).

Forcing the download (via Content-Disposition header) would likely be even better, but it is annoying for users.

Re:Instagram's URL Blackhole by cxr on Sunday February 15, 2026 @08:19AM (#47023434)
Replying to this comment because though it's vague in specifics it reads as authoritative and knowledgeable. In reality, it confuses/conflates multiple things.

Serving HTML source as text/plain is safe. No browser capable of understanding CSP is going to be at risk of anything that CSP would actually protect against in this case.