405 on POST request Pages website using React

Hi, I have been trying to integrate a slack feedback feature on my website using React and have been able to successfully make it work using a POST request on form submit.

This only works on either localhost or on a web provider that is not Cloudflare. Whenever I try to submit (or POST) in the pages deployment it gives me an extremely generic 405 error.

Is there something obvious I might be missing? Do I need to use Workers for this? Is there some rule I must activate? I am quite lost. Have been at this for about 5 days reading forums, exploring all options and nothing I did was able to fix it.

If someone could clarify what in Cloudflare is blocking this, It would be greatly appreciated!

Thanks in advance.

405 would indicate it not hitting the Function, is the repo open source? Can we take a look?

You can check the “Functions” tab on the deployment which will list the routes and methods being fired. Is the one you’re expecting there?

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