Home > Back-end >  Micro service inside how to prevent cross gateway direct access to the micro service
Micro service inside how to prevent cross gateway direct access to the micro service

Time:03-19

Micro service inside how to prevent cross gateway direct access to the micro service

CodePudding user response:

Simple request interceptor, either in the header plus fixed keys or any other method, as long as it can distinguish is the gateway to request can intercept other requests, complex can be achieved through the network configuration requirements,

CodePudding user response:

We are done by checking JWT, in fact, the principle and upstairs, is through the net GuanJian right after first, JWT token is generated, on the request head, behind every micro service need check JWT, not naturally rejected, feign between micro service call will do with aop interception, inserted the JWT request, this micro service calls between also is not affected, there is no code intrusion, feign call before how to write, then how to write
  • Related