GET requests is ok, but POST requests returns 502

I’ve subscribed to CF few hours ago, rewrite DNS records, turned on DNSSEC and event setup my host with CF SSL certificates. Host has simple OpenAPI (SWAGGER) dynamic API and I’m getting fine answers on HTTP GET requests but POST requests returns 502. Should I just wait for some propogation time? Is it ok to hide non static resources with CF?

Thank You!
Alex.

I assume you are not getting a browser rendering in this case. Can you post the response body!

I’m running test request through service’s generated swagger ui (browser GET’s it successfully!) and test shows response and it’s headers also. Here is headers:

access-control-allow-headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding
access-control-allow-methods: PUT, POST, GET, OPTIONS, DELETE
access-control-allow-origin: *
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 47aa528048dc822b-KBP
content-type: text/html; charset=UTF-8
date: Fri, 16 Nov 2018 13:32:12 GMT
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
expires: Thu, 01 Jan 1970 00:00:01 GMT
pragma: no-cache
server: Cloudflare
status: 502

And response body contains CF generated page with standard answer about 502 error.

If the page is generated by Cloudflare it would seem the origin cant be reached, even though the HTTP method shouldnt influence that. You’d need to post the URLs in order for someone to be able to tell more.

Origin is definitly reached, because browser gets service OpenAPI generated page from it. That’s why Im saying about GET is ok, POST is 502. Hope it’s just propagation time. Will wait.

Thank You!

If GET works it cant be a propagation issue.

1 Like

Considering that you are proxying it it can be even less of a DNS issue. Usually I’d point towards a security block, but that shouldnt raise a 502.

Well… Two days passed and I still got 502 on POST requests. Any suggestions?

I’ve created site rule to bypass cache and it’s working so far.
Whatever it was it’s now gone. Thank you.

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