spring gateway server cannot get response from upsteam server when gateway server protected witeh csrf and request content type is application/x-www-form-urlencoded #9640
Labels
status: duplicate
A duplicate of another issue
there are two simple server.
the 1st is gateway server.
it's only import gateway and security.
and it's security config like this. they are very simple. so i write them in the same class
the gateway routes
the 2nd is an upstream server
it is a simple web server
the dto class has 2 properties a and b
and i config the server start on port 8888
and then ,i use post man to test them.
the 1st time ,i have no csrf value.
the server response the invalidate csrf token exception.
and then i get csrf token value from cookie values.
and then i send request with csrf header.
the client is wait for response more than 3 minutes and not completed.
i test the other content type ,they are completed normal.
if the upstream server's function params is empty or the client request params is empty. it can be completed.
the test project is here https://github.com/ldwqh0/spring_gateway_csrf_bug
The text was updated successfully, but these errors were encountered: