Skip to content

files

Serving back what you were uploaded

Content types, and who gets to choose them.

An upload arrives with a claim about what it is, and that claim is made by whoever is uploading. Keeping it is reasonable — it is genuinely useful to know what somebody thought they were sending. Serving the file back under it is not.

A file served as text/html from your origin is a page on your origin, with your cookies and your permissions, written by whoever uploaded it. Nothing about the file changed; the header did.

  • GET /documents/d4

    The same bytes both times. Compare the content-type each build sends, and where it says the type came from.

This build

docs.example.com

Nothing sent yet. Every request goes to the application in this tab and nowhere else.