Browser deploy gives 403 if _headers is used

If I upload a directory to a Pages project I get a 403 API error if the uploaded directory contains a _headers file. If I remove the file everything works fine.
I’ve changed the content of the _headers file to circumvent any typos and tried copy/pasted examples, but even if it is 0 bytes it gives the error.

The error is shown after:

  • I clickDeploy a site by uploading your porject
  • ‘select from computer’
  • Upload folder
  • confirm upload
  • receive ‘all files were succesully uploaded’
  • click the ‘save and deploy’ button
    THEN a red bar on the bottom of the screen opens:
    API Request Failed: POST /api/v4/accounts/804…/deployments (403)

Anyone a solution?
Thanks in advance.

Hello errel,

have you found a solution to this problem ?

I have the same problem, and don’t know how to solve it :frowning:

This will be WAF triggering because it’s detecting something odd.

I’d suggest using Wrangler instead

1 Like

Thanks a lot, it uploaded instantly with Wrangler.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.