Skip to content

Download blocked

The answer a shared domain such as mockhub.dev gives a browser that navigates to a file download.

Field Value
type https://mockhub.dev/problems/download-blocked
Status 403

Someone opened the address in a browser tab, a frame or a link, and the mock’s response is a download: it sends Content-Disposition: attachment, or a Content-Type a browser hands to its download manager instead of displaying, such as application/octet-stream, application/zip, a font or text/csv. A shared domain is every customer’s, so MockHub does not let one project hand a file to a visitor under its name.

A browser that opens the address still gets the response when it is not an attachment and its Content-Type is one of these:

Kind Content-Type
Text text/plain, text/html, text/css, text/javascript, text/xml
Data application/json and any application/…+json, application/xml, application/xhtml+xml, application/javascript
Documents application/pdf
Images image/png, image/jpeg, image/gif, image/webp, image/avif, image/svg+xml, image/x-icon, image/vnd.microsoft.icon, image/bmp, image/apng
Audio audio/mpeg, audio/ogg, audio/wav, audio/webm, audio/aac, audio/flac, audio/mp4
Video video/mp4, video/webm, video/ogg

Every other type is refused to a browser, including every font and the other text/, image/, audio/ and video/ types. The mock keeps its other answers as they are.

Always 403.

Only from a project’s address on a shared domain, never from the app or an AI assistant:

When detail
A browser navigates to a response that is a download This host does not serve downloads to a browser. Fetch it from code, or use a verified custom domain.

MockHub answers this only when the request is a browser opening the address as a page, frame or embedded object. Code that fetches the address gets the file.

This type carries no extension members.

{
"type": "https://mockhub.dev/problems/download-blocked",
"title": "Download blocked",
"status": 403,
"detail": "This host does not serve downloads to a browser. Fetch it from code, or use a verified custom domain."
}

Call the address from code. fetch, an SDK, curl or a test runner’s HTTP client gets the file, with its Content-Disposition header, exactly as the mock sends it.

A browser test that opens the download link in a page gets this answer, because the browser itself marks the request as a navigation. Fetch the file with the test runner’s HTTP client instead, such as Playwright’s request fixture or Cypress’s cy.request, or put the project on a custom domain, which serves downloads to a browser too.

A shared domain that refuses to run an HTML page does not answer this type: it sends the page with Content-Security-Policy: sandbox instead. See Pages and cookies on a shared domain.

Report a problem with this page