cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2 can't handle POST request with underscore form-data parameter

Magento2 can't handle POST request with underscore form-data parameter

I have Controller to recive notification from external API - that API sent me parameter 'session_id' but Magento always return 404 when this param is sent - I have noticed that problem is underscore, when I test it via Postman with parameter 'sessionId' or 'session' everything is fine - 'session_id' result 404. I use CsrfAwareActionInterface in Controller to handle POST request.

Problem exist only with remote server where I test my custom payment gateway plugin, on local machine everythings works fine, no matter if I pass param 'session_id' or whatever with underscore.

Any ideas why is this happening and how can I fix it?

 

EDIT. I found out not underscore is a problem, I can pass other params with it, the problem is exactly 'session_id' expression