Cannot preserve POST request in PingAccess

546 Views Asked by At

I am getting this error when trying to authenticate to my application.

Log extract: level":"ERROR","message":"Cannot preserve POST request with content type 'application/json; charset=UTF-8' (only 'application/x-www-form-urlencoded' is supported)

My question: Is there a way to configure PingFederate, so it can handle POST requests?

1

There are 1 best solutions below

2
Andrew K. On

That's not a PingFederate error, that's a PingAccess error.

This issue is typically seen on AJAX requests from a Single Page Application, where that Application definition in PingAccess has not been appropriately defined as "Web+API" with the "SPA Support" box checked. It happens when the PingAccess web session has expired, and the application tries to POST an update to the backend.

It must be understood, however, that the application will need to be coded so that it either handles the 401 or follows the 302 redirect that it gets back, once you add SPA Support.