HTTP Post request through Access

Hello Cloudflare community!

I’m currently diving into the wonders of Access by barricading our API behind it. After some fiddling with the settings, I was able to send requests through Access using Service Tokens. :smile:

However, I stumbled upon a problem. The service behind Access is a simple, dockerized NGINX server with a reverse proxy to a Nodejs application. When I run it locally, I have no problems sending my POST requests to the application using Postman.

But the live server behind Access receives all requests, no matter the method, as GET requests.

Have I forgot to set something up or what am I missing here?

NGINX Config:

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name api.my-website.com;

    ssl_certificate /etc/nginx/cert/mycertificate.pem;
    ssl_certificate_key /etc/nginx/cert/mykey.key;

    location / {
        set $backend http://backend:8080;
        proxy_pass $backend;
    }
}

Thanks

Fabian

1 Like

After I had another look at it today, I found out that I can enable a setting in Postman:

Follow original HTTP Method
Redirect with the original HTTP method instead of the default behavior of redirecting with GET.

After enabling this, my request got send through to my application, however the request body was an empty JSON now.

I tried the same with curl but then the request body was also emptied.