Я использую nuxt. js с Spring Gateway, и у меня возникла странная проблема, когда несколько запросов к шлюзу в конечном итоге дублируют заголовки, содержащие токены аутентификации, что приводит к превышению лимита HTTP-заголовка.
Чтобы обойти проблемы cors, мои внешние сайты за шлюзом и все запросы отправляются на шлюз через 8080 и перенаправляются на конечные точки внешнего / внутреннего интерфейса.
Моя настройка
Spring Gateway
spring:
application:
name: gateway-service
cloud:
gateway:
routes:
- id: auth-service
uri: ${domain.gateway.proxyurls.auth}
predicates:
- Path=/portal/auth/**
- id: business-object-service
uri: ${domain.gateway.proxyurls.businessobject}
predicates:
- Path=/portal/api/business-object/**
filters:
- RewritePath=/portal(?<segment>/?.*), $\{segment}
######################################################
## ##
## The default goes to the nuxt frontend app ##
## ##
######################################################
- id: frontend
uri: ${domain.gateway.proxyurls.frontend}
predicates:
- Path=/**
Nuxt. js интерфейс с запросом
<template>
<div>
<template v-if="$auth.$state.loggedIn">
Username {{$auth.user.username}}
<br /> <br />
<button @click="$auth.logout()">Logout</button>
<br />
<ol>
<li>{{newsItem1}}</li>
<li>{{newsItem2}}</li>
<li>{{newsItem3}}</li>
<li>{{newsItem4}}</li>
<li>{{newsItem5}}</li>
</ol>
Fetch <button @click="$fetch">Refresh</button>
<p>
</p>
</template>
<a
v-else
href="#"
@click="$auth.loginWith('hri')"
>Login</a>
</div>
</template>
<script>
export default {
name: "Home",
data () {
return {
newsItem1: '',
newsItem2: '',
newsItem3: '',
newsItem4: '',
newsItem4: ''
}
},
fetchOnServer: true,
async fetch () {
this.newsItem1 = await this.$axios.$get('/portal/api/business-object/reports/status-info-rpci')
this.newsItem2 = await this.$axios.$get('/portal/api/business-object/reports/status-info-alb')
this.newsItem3 = await this.$axios.$get('/portal/api/business-object/reports/status-info-alb')
this.newsItem4 = await this.$axios.$get('/portal/api/business-object/reports/status-info-alb')
this.newsItem4 = await this.$axios.$get('/portal/api/business-object/reports/status-info-alb')
}
}
</script>
след:
2020-05-28 05:32:15.513 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: frontend
2020-05-28 05:32:15.514 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:8080/portal/] to Route{id='frontend',
uri=http://localhost:3000, order=0, predicate=Paths: [/**], match
trailing slash: true, gatewayFilters=[[[DedupeResponseHeader
Authorization Cookie = RETAIN_UNIQUE], order = 1]], metadata={}}
2020-05-28 05:32:15.514 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : [d15d386e-19] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.514 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.532 DEBUG 8492 ---
[ctor-http-nio-7] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: auth-service 2020-05-28 05:32:15.532 DEBUG 8492 ---
[ctor-http-nio-7] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping
[Exchange: POST http://localhost:3000/portal/auth/oauth/token] to
Route{id='auth-service', uri=http://localhost:8900, order=0,
predicate=Paths: [/portal/auth/**], match trailing slash: true,
gatewayFilters=[[[RewritePath /portal/auth(?<segment>/?.*) =
'${segment}'], order = 1]], metadata={}} 2020-05-28 05:32:15.532 DEBUG
8492 --- [ctor-http-nio-7] o.s.c.g.h.RoutePredicateHandlerMapping :
[b25a5952-20] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.533 DEBUG 8492 --- [ctor-http-nio-7]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal/auth(?<segment>/?.*) =
'${segment}'], order = 1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.549 DEBUG 8492 ---
[ctor-http-nio-8] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: auth-service 2020-05-28 05:32:15.549 DEBUG 8492 ---
[ctor-http-nio-8] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping
[Exchange: GET http://localhost:3000/portal/auth/api/users/me] to
Route{id='auth-service', uri=http://localhost:8900, order=0,
predicate=Paths: [/portal/auth/**], match trailing slash: true,
gatewayFilters=[[[RewritePath /portal/auth(?<segment>/?.*) =
'${segment}'], order = 1]], metadata={}} 2020-05-28 05:32:15.549 DEBUG
8492 --- [ctor-http-nio-8] o.s.c.g.h.RoutePredicateHandlerMapping :
[83756017-21] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.549 DEBUG 8492 --- [ctor-http-nio-8]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal/auth(?<segment>/?.*) =
'${segment}'], order = 1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.566 DEBUG 8492 ---
[ctor-http-nio-9] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: business-object-service 2020-05-28 05:32:15.566 DEBUG 8492
--- [ctor-http-nio-9] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:3000/portal/api/business-object/reports/status-info-rpci]
to Route{id='business-object-service', uri=http://localhost:9400,
order=0, predicate=Paths: [/portal/api/business-object/**], match
trailing slash: true, gatewayFilters=[[[RewritePath
/portal(?<segment>/?.*) = '${segment}'], order = 1],
[[DedupeResponseHeader Authorization Cookie = RETAIN_UNIQUE], order =
2]], metadata={}} 2020-05-28 05:32:15.566 DEBUG 8492 ---
[ctor-http-nio-9] o.s.c.g.h.RoutePredicateHandlerMapping :
[f71d986f-22] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.567 DEBUG 8492 --- [ctor-http-nio-9]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal(?<segment>/?.*) = '${segment}'],
order = 1], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 2],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.651 DEBUG 8492 ---
[tor-http-nio-10] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: business-object-service 2020-05-28 05:32:15.651 DEBUG 8492
--- [tor-http-nio-10] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:3000/portal/api/business-object/reports/status-info-alb]
to Route{id='business-object-service', uri=http://localhost:9400,
order=0, predicate=Paths: [/portal/api/business-object/**], match
trailing slash: true, gatewayFilters=[[[RewritePath
/portal(?<segment>/?.*) = '${segment}'], order = 1],
[[DedupeResponseHeader Authorization Cookie = RETAIN_UNIQUE], order =
2]], metadata={}} 2020-05-28 05:32:15.651 DEBUG 8492 ---
[tor-http-nio-10] o.s.c.g.h.RoutePredicateHandlerMapping :
[e36f913a-23] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.651 DEBUG 8492 --- [tor-http-nio-10]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal(?<segment>/?.*) = '${segment}'],
order = 1], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 2],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.703 DEBUG 8492 ---
[tor-http-nio-11] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: business-object-service 2020-05-28 05:32:15.703 DEBUG 8492
--- [tor-http-nio-11] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:3000/portal/api/business-object/reports/status-info-alb]
to Route{id='business-object-service', uri=http://localhost:9400,
order=0, predicate=Paths: [/portal/api/business-object/**], match
trailing slash: true, gatewayFilters=[[[RewritePath
/portal(?<segment>/?.*) = '${segment}'], order = 1],
[[DedupeResponseHeader Authorization Cookie = RETAIN_UNIQUE], order =
2]], metadata={}} 2020-05-28 05:32:15.703 DEBUG 8492 ---
[tor-http-nio-11] o.s.c.g.h.RoutePredicateHandlerMapping :
[fb10dd1f-24] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.703 DEBUG 8492 --- [tor-http-nio-11]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal(?<segment>/?.*) = '${segment}'],
order = 1], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 2],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.752 DEBUG 8492 ---
[tor-http-nio-12] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: business-object-service 2020-05-28 05:32:15.752 DEBUG 8492
--- [tor-http-nio-12] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:3000/portal/api/business-object/reports/status-info-alb]
to Route{id='business-object-service', uri=http://localhost:9400,
order=0, predicate=Paths: [/portal/api/business-object/**], match
trailing slash: true, gatewayFilters=[[[RewritePath
/portal(?<segment>/?.*) = '${segment}'], order = 1],
[[DedupeResponseHeader Authorization Cookie = RETAIN_UNIQUE], order =
2]], metadata={}} 2020-05-28 05:32:15.752 DEBUG 8492 ---
[tor-http-nio-12] o.s.c.g.h.RoutePredicateHandlerMapping :
[34e63694-25] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.752 DEBUG 8492 --- [tor-http-nio-12]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal(?<segment>/?.*) = '${segment}'],
order = 1], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 2],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.803 DEBUG 8492 ---
[ctor-http-nio-1] o.s.c.g.h.RoutePredicateHandlerMapping : Route
matched: business-object-service 2020-05-28 05:32:15.803 DEBUG 8492
--- [ctor-http-nio-1] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:3000/portal/api/business-object/reports/status-info-alb]
to Route{id='business-object-service', uri=http://localhost:9400,
order=0, predicate=Paths: [/portal/api/business-object/**], match
trailing slash: true, gatewayFilters=[[[RewritePath
/portal(?<segment>/?.*) = '${segment}'], order = 1],
[[DedupeResponseHeader Authorization Cookie = RETAIN_UNIQUE], order =
2]], metadata={}} 2020-05-28 05:32:15.803 DEBUG 8492 ---
[ctor-http-nio-1] o.s.c.g.h.RoutePredicateHandlerMapping :
[ab9dbe90-26] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:15.804 DEBUG 8492 --- [ctor-http-nio-1]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories:
[[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@59918c8f},
order = -2147483648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4bc9ca97},
order = -2147482648],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@2450256f},
order = -1],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@24197b13}, order = 0],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.GatewayMetricsFilter@2776fd8f},
order = 0], [[RewritePath /portal(?<segment>/?.*) = '${segment}'],
order = 1], [[DedupeResponseHeader Authorization Cookie =
RETAIN_UNIQUE], order = 2],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@2b7facc7},
order = 10000],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1c62c3fd},
order = 10100],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@71b97eeb},
order = 2147483646],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2c60ce47},
order = 2147483647],
[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@1c74d19},
order = 2147483647]] 2020-05-28 05:32:15.855 ERROR 8492 ---
[ctor-http-nio-6] a.w.r.e.AbstractErrorWebExceptionHandler :
[d15d386e-19] 500 Server Error for HTTP GET "/portal/"
io.netty.handler.codec.TooLongFrameException: HTTP header is larger
than 15000 bytes. at
io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.newException(HttpObjectDecoder.java:915)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] Suppressed:
reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has
been observed at the following site(s): |_ checkpoint ⇢
org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter
[DefaultWebFilterChain] |_ checkpoint ⇢
org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter
[DefaultWebFilterChain] |_ checkpoint ⇢ HTTP GET "/portal/"
[ExceptionHandlingWebHandler] Stack trace: at
io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.newException(HttpObjectDecoder.java:915)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.increaseCount(HttpObjectDecoder.java:910)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.process(HttpObjectDecoder.java:898)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.buffer.AbstractByteBuf.forEachByteAsc0(AbstractByteBuf.java:1336)
~[netty-buffer-4.1.49.Final.jar:4.1.49.Final] at
io.netty.buffer.AbstractByteBuf.forEachByte(AbstractByteBuf.java:1316)
~[netty-buffer-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:872)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpObjectDecoder.readHeaders(HttpObjectDecoder.java:572)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:214)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202)
~[netty-codec-http-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501)
~[netty-codec-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:440)
~[netty-codec-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
~[netty-codec-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:271)
~[netty-handler-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
~[netty-transport-4.1.49.Final.jar:4.1.49.Final] at
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
~[netty-common-4.1.49.Final.jar:4.1.49.Final] at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
~[netty-common-4.1.49.Final.jar:4.1.49.Final] at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
~[netty-common-4.1.49.Final.jar:4.1.49.Final] at
java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2020-05-28 05:32:17.680 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: frontend
2020-05-28 05:32:17.680 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET
http://localhost:8080/portal/sw.js] to Route{id='frontend',
uri=http://localhost:3000, order=0, predicate=Paths: [/**], match
trailing slash: true, gatewayFilters=[[[DedupeResponseHeader
Authorization Cookie = RETAIN_UNIQUE], order = 1]], metadata={}}
2020-05-28 05:32:17.680 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.h.RoutePredicateHandlerMapping : [d15d386e-27] Mapped to
org.springframework.cloud.gateway.handler.FilteringWebHandler@343c0132
2020-05-28 05:32:17.680 DEBUG 8492 --- [ctor-http-nio-6]
o.s.c.g.handler.FilteringWebHandler : Sorted
gatewayFilterFactories: