Zuul 将相同的请求代理到另一个端口
Zuul proxy same request to another port
我希望能够在 Spring 引导服务器上使用 Zuul 运行 进行代理,该服务器侦听端口 X 到端口 Y,其中 nginx 在同一台机器上侦听。我想发送相同的 URL、参数等
我这样做的原因是使用 ZuulFilter
进行一些检查。
例如我想到达 localhost:8943/humans/get/1
并将请求发送到 localhost:8080/humans/get/1
提前致谢。
像这样的东西应该有用。
zuul:
routes:
humans:
path: /humans/**
url: http://localhost:8080
我已经通过以下配置成功完成了:
zuul:
routes:
services:
path: /**
url: http://localhost:8043/
我希望能够在 Spring 引导服务器上使用 Zuul 运行 进行代理,该服务器侦听端口 X 到端口 Y,其中 nginx 在同一台机器上侦听。我想发送相同的 URL、参数等
我这样做的原因是使用 ZuulFilter
进行一些检查。
例如我想到达 localhost:8943/humans/get/1
并将请求发送到 localhost:8080/humans/get/1
提前致谢。
像这样的东西应该有用。
zuul:
routes:
humans:
path: /humans/**
url: http://localhost:8080
我已经通过以下配置成功完成了:
zuul:
routes:
services:
path: /**
url: http://localhost:8043/