Spring Cloud API Gateway Issue

I have a problem about sending any request to the relevant service without the usage of bearer token. After I registered, user information is created in user table. When I login, bearer token and refresh token as well as other information information is shown in the postman. I can send a request without the usage of bearer token. What I really want to do is to send any request to other service after authentication. I get this issue "An expected CSRF token cannot be found (403 Forbidden)" when I send a request through the port number of api gateway. I think there can be problem in api gateway but I couldn't solve it? How can I do that? I updated my repository : https://github.com/Rapter1990/microservicecoursedailybuffer
GitHub
GitHub - Rapter1990/microservicecoursedailybuffer: Spring Boot Micr...
Spring Boot Microservice Example. Contribute to Rapter1990/microservicecoursedailybuffer development by creating an account on GitHub.
4 Replies
dan1st
dan1st3y ago
if you use Spring Security, every POST request requires a CSRF token you can disable that iff you do not use cookies for authentication
direct_x_34
direct_x_34OP3y ago
I already disabled in auth service. @everyone
dan1st
dan1st3y ago
lol that doesn't work the auth service is not csrf
direct_x_34
direct_x_34OP3y ago
Stack Overflow
Spring Cloud API Gateway JWT Issue java.lang.ClassNotFoundException...
I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login. After login, I tried to send a request to a defined service but...

Did you find this page helpful?