0

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?

Scott T.
  • 6,152
  • 1
  • 26
  • 32

1 Answers1

1

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.

Andrew K.
  • 3,240
  • 12
  • 23
  • You seem to know your stuff :-) you were right, thank you very much for the hint. Doubts: Can I solve the problem without changing the application type which is set to "Web" at the moment. I may not be able to change the configuration of the application in PingAccess to "Web + API" due to policies. – Dev.User993 Mar 09 '20 at 12:29
  • I may or may not be a product manager at Ping :-) . I'd have to muck around and test it, but you _may_ be able to get away with just checking the "SPA Support" checkbox... But I think you need the Web+API setting. – Andrew K. Mar 09 '20 at 15:00