Replies: 1 comment
-
@kefayati Sorry for the late reply. This feature has been implemented in the latest releases of dropwizard-web: bootstrap.addBundle(new WebBundle<>() {
@Override
public WebConfiguration getWebConfiguration(final ExampleConfiguration configuration) {
return configuration.getWebConfiguration();
}
// Optional: Override Servlet environment to apply the configuration to the admin servlets
@Override
protected ServletEnvironment getServletEnvironment(Environment environment) {
return environment.admin();
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I needed to set headers on the admin site, which is typically spun up on a different port and different servlets. Checking the code, it seems using
environment.servlets()
is hardcoded and there is no option to chooseenvironment.admin()
and add the header filter there. Is there a reason for that? It is a relatively simple fix and I am happy to do a PR to add that option but I was wondering if there is something I am missing.Beta Was this translation helpful? Give feedback.
All reactions