Cloudflare doesn't repass post parameters [Angular SPA + Laravel]

Hi everyone!

I’m having problems with my login form. When sending data (email and password), they arrive empty on the server. In fact, neither the fields nor their respective values are passed on.

This error happens from time to time. I realized that if the page is reloaded, or if some time has passed, and I try to login again, it passes. I am using Angular 5 (SPA) with Laravel 5.4 and PHP 5.6 on the server.

I have already tested it with chrome / firefox browsers and postman. If I disable cloudflare, the error does not happen.

I’ve made a video showing the problem:


Hello everyone again!

One more detail that I noticed: if I log in first on the computer and then on the smartphone, it gives an error. If by chance I update the page on the computer and then try to login on the smartphone, it accepts and does not present errors.

I forgot to mention in the post that I am making the request using http post sending a json to the server.


Can you check if the response had been cached by Cloudflare?

Look for the response header cf-cache-status

Thanks for answering Eric!

Then, the server is returning the “cf-cache-status: Dynamic” attribute in the response header. Searching, I saw that Dynamic means that the content is not being cached.

Any other tips?

Edit: below are the response and request headers:

HTTP/2 405 Method Not Allowed
date: Sun, 17 Jan 2021 14:35:31 GMT
content-type: text/html; charset=UTF-8
access-control-allow-origin: *
access-control-allow-headers: Origin, Content-Type, X-Auth-Token
allow: POST
cache-control: no-cache, private
vary: Accept-Encoding
cf-cache-status: DYNAMIC
cf-request-id: 07b25ed7b20000f7244c9c9000000001
expect-ct: max-age=604800, report-uri=“
report-to: {“endpoints”:[{“url”:“"}],“group”:“cf-nel”,"max_age”:604800}
nel: {“report_to”:“cf-nel”,“max_age”:604800}
server: cloudflare
cf-ray: 6130cd9f888bf724-GRU
X-Firefox-Spdy: h2

POST /api/authenticate/login HTTP/2
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: application/json, text/plain, /
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Content-Length: 42
DNT: 1
Connection: keep-alive
Cookie: __cfduid=df1806551ad4c421270cc6825a93b82f31610893939; io=rR6MNqWHzdiSPG1-AACg; cookieconsent_status=dismiss
TE: Trailers

Is HTTP 405 response expected?

Can you try disable proxy for the subdomain, wait for few minutes and try whether you still get the same issue?

If yes, then probably something happened on your server side.