Proxying POST request through netlify?

Hi there netlify family,

I m hoping what I m trying to achieve is possible. We are launching a new SPA on netlify to move away from a legacy site. To support some old endpoints during the transition I’d like to be able to proxy a POST request to an endpoint on netlify to our existing api.

My proxy rule seems to register without errors and netlify does pick it up when hitting from postman but returns a 403 forbidden.

/api/User/GetSubscriptionData {}/dev/subscription 200

Wondering how netlify is passing along the request. Maybe I should be using a 307 to include post params? Currently the api endpoint it’s redirecting to is a GET to accommodate the possibility of netlify changing the post to a GET but we can change that if need be.

Any insight into how netlify is passing this request through and how I can handle it gracefully on the api layer is greatly appreciated.

Thank you in advance

Hi @Brendan and welcome to our community!

POSTs should work via proxy; we just send the POST to your remote service and then proxy its response back

To understand why it isn’t working, you might try sending us the value of the x-nf-request-id HTTP response header from a failed POST so we can see what site and rules are involved. This article explains how to get it: