Getting 520 error when content-length is above 262144 bytes plus non-OK response

Here is what I did:

  1. Made a request where everything is correct. Got 200 OK response.
  2. Token got expired after few mins, made the request again. Got 401 error.
  3. For the same request, if I hit again, I’m getting 520 error for the subsequent calls.

The weird things is that when the content-length is below 262144 bytes I’m getting the exact response that I’m getting from my actual server.
But, when it’s more than that, I keep getting 520 error if I get non-OK response for the first time.

I don’t have any clue why this is happening.

Data for debug:
CF-RAY: 822667793d4f4106-SIN
URL: https://dev-api.zoopwallet.app/account/v1/user/share/
cdn-cgi/trace:

fl=633f148
h=dev-api.zoopwallet.app
ip=27.107.8.130
ts=1699368954.409
visit_scheme=https
uag=PostmanRuntime/7.34.0
colo=SIN
sliver=none
http=http/1.1
loc=IN
tls=TLSv1.3
sni=plaintext
warp=off
gateway=off
rbi=off
kex=X25519

HAR file: No HAR file as I’m making the request from the Postman.

Forgot to mention, I origin server is returning fine when proxy is disabled on the Cloudflare DNS page.

The issue is coming even when the development mode is on and Cloudflare is paused.

Also http is working fine but when requesting using https then getting the issue.

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