We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Spring Security does not use the ServerExchangeRejectedHandler Bean when exposed.
ServerExchangeRejectedHandler
We should fix this, but in the meantime users can leverage a BeanPostProcessor approach.
BeanPostProcessor
@Bean BeanPostProcessor beanPostProcessor() { return new BeanPostProcessor() { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof WebFilterChainProxy) { WebFilterChainProxy springSecurity = (WebFilterChainProxy) bean; springSecurity.setExchangeRejectedHandler((exchange, ex) -> Mono.fromRunnable(() -> exchange.getResponse().setStatusCode(HttpStatus.NOT_ACCEPTABLE))); } return bean; } }; }
The text was updated successfully, but these errors were encountered:
Support ServerExchangeRejectedHandler @bean
e86d88d
Closes gh-15975
c24b5eb
Closed via e86d88d
Sorry, something went wrong.
rwinch
No branches or pull requests
Spring Security does not use the
ServerExchangeRejectedHandler
Bean when exposed.We should fix this, but in the meantime users can leverage a
BeanPostProcessor
approach.The text was updated successfully, but these errors were encountered: