|
|
|
@ -80,6 +80,7 @@ public class PreDecorationFilterTests {
@@ -80,6 +80,7 @@ public class PreDecorationFilterTests {
|
|
|
|
|
RequestContext ctx = RequestContext.getCurrentContext(); |
|
|
|
|
assertEquals("/foo/1", ctx.get("requestURI")); |
|
|
|
|
assertEquals("localhost:80", ctx.getZuulRequestHeaders().get("x-forwarded-host")); |
|
|
|
|
assertEquals("http", ctx.getZuulRequestHeaders().get("x-forwarded-proto")); |
|
|
|
|
assertEquals("/api", ctx.getZuulRequestHeaders().get("x-forwarded-prefix")); |
|
|
|
|
assertEquals("foo", getHeader(ctx.getOriginResponseHeaders(), "x-zuul-serviceid")); |
|
|
|
|
} |
|
|
|
@ -94,6 +95,7 @@ public class PreDecorationFilterTests {
@@ -94,6 +95,7 @@ public class PreDecorationFilterTests {
|
|
|
|
|
RequestContext ctx = RequestContext.getCurrentContext(); |
|
|
|
|
assertEquals("/1", ctx.get("requestURI")); |
|
|
|
|
assertEquals("localhost:80", ctx.getZuulRequestHeaders().get("x-forwarded-host")); |
|
|
|
|
assertEquals("http", ctx.getZuulRequestHeaders().get("x-forwarded-proto")); |
|
|
|
|
assertEquals("/api/foo", ctx.getZuulRequestHeaders().get("x-forwarded-prefix")); |
|
|
|
|
assertEquals("foo", getHeader(ctx.getOriginResponseHeaders(), "x-zuul-serviceid")); |
|
|
|
|
} |
|
|
|
|