我很抱歉我的英语可能无法清楚地表达我的问题。春季Zuul路线在路径参数'http://'中的'/'
我使用thumbor用于裁剪图像,e.g:http://thumbor-server/unsafe/300x200/http://192.168.99.100/images/image1.jpg
我也使用nginx的路由请求到thumbor,例如请求http://192.168.1.100/image-service/unsafe/300x200/http://192.168.99.100/images/image1.jpg
将被路由到http://thumbor-server/unsafe/300x200/http://192.168.99.100/images/image1.jpg
。
但由于某些原因,我必须使用Spring zuul来执行路由而不是nginx。所以我配置路由筛选器是这样的:
zuul: ignored-services: '*' sensitiveHeaders: Cookie,Set-Cookie routes: image-service: path: /image-service/** url: http://thumbor-server
但通过zuul路由后,thumbor不能从http://192.168.99.100/images/image1.jpg
因为图像的URL被剥离一个“/”在加载图像的“http://”,所以thumbor显示错误表示'http:/192.168.99.100/images/image1.jpg'是无效路径。
我必须通过删除图像的url中的'http://'来解决。
是否存在一个配置,Zuul不在路由请求的url中的'http://'中去掉'/'?
非常感谢。