Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call static resource from another filter #26637

Open
germanicus9 opened this issue Jul 7, 2024 · 0 comments
Open

Call static resource from another filter #26637

germanicus9 opened this issue Jul 7, 2024 · 0 comments

Comments

@germanicus9
Copy link

germanicus9 commented Jul 7, 2024

I have these two filters:
SpaWebFilter and
OAuth2ReactiveRefreshTokensWebFilter
On the OAuth2ReactiveRefreshTokensWebFilter I manage refresh tokens. However in the idle mode I want to reload de home page and start login again.
I tried to call the home page from OAuth2ReactiveRefreshTokensWebFilter:
.onErrorResume(e -> initiateReAuthentication(exchange));

private Mono<Void> initiateReAuthentication(ServerWebExchange exchange) { return new SpaWebFilter().filter(exchange.mutate().request(exchange.getRequest().mutate().path("/").build()).build(), chain) }
or directly
return exchange.mutate().request(exchange.getRequest().mutate().path("/index.html").build()).build().

Unfortunately doesn't work even when I start the application the SpaWebFilter loads the static resource. Where is the difference?
Please support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant