Springcloud joins spring session to request session inconsistency through zuul

Recently, permission url verification has been added to the gateway of learning springcloud idea, so that other microservices do not need to do url verification. The problem with spring session used for distributed session is: accessing each microservice individually, the session can be uniformly requested to the same A sessionId, but when it is forwarded to two microservices through zuul, the requested session is inconsistent. Later, after checking the information on the Internet, the solution is to increase the zuul configuration by quota uzhiwenjian:

application.properties:

  1. zuul.routes.api-a.sensitiveHeaders="*"  

 Start the registry, zuul gateway, and two microservices, then first access the same session through the two microservices, and then forward the two microservice sessions through zuul. The problem is solved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326266086&siteId=291194637