Reputation: 21
I am new to PCF and I have created a zuul routing spring boot app and deployed the cloud. My PCF Route for this router app is domain.cfd2.checkFinancial.com.
I want to route the call to "https://domain.cfd2.checkFin.com/cardmembersvcs/acs" to our internal server https://vst0.mapi.checkFin.com/
Below is my Application.yml / Zuul Mapping :
---
spring:
profiles: default
zuul:
routes:
cloud:
path: /cardsvcs/acs/**
sensitiveHeaders:
url: https://vst0.mapi.checkFin.com/cardsvcs/acs/
stripPrefix: false
ribbon:
eureka:
enabled: false
So this set up run perfect when I run from the local, and I hit /cardsvcs/acs/test/api and request is routed to /vst0.mapi.checkFin.com/cardsvcs/acs/test/api
But when I hit the Cloud URL from Postman domain.cfd2.checkFin.com/cardmembersvcs/acs/test/api, I get a 404 and I see in the logs the warning " 2017-05-15T15:46:37.000+00:00 [APP] OUT 2017-05-15 15:46:37.399 WARN 19 --- [nio-8080-exec-4] o.s.c.n.zuul.web.ZuulHandlerMapping : No routes found from RouteLocator"
Shouldn't any route containing /cardsvcs/acs/** be mapped?
Upvotes: 1
Views: 7237
Reputation: 11
You need to enable zuul Proxy in your main class with @EnableZuulProxy
.
I am sure you will not get below error message in your server logs, however:
[nio-8080-exec-4] o.s.c.n.zuul.web.ZuulHandlerMapping : No routes found from RouteLocator"
Upvotes: 1
Reputation: 3475
Seems you are mapping requests to Zuul host like: http://<zuul>/cardsvcs/acs....
via:
path: /cardsvcs/acs/**
But a route mapping for http://<zuul>/cardmembersvcs/acs
is missing
Upvotes: 0