spring-projects / spring-projects/spring-boot

Embedded servlet customizer unavailable to management webserver

Open
#14,302 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

I have a custom WebServerFactoryCustomizer but its not available for management webserver. What's the best way to make the customization available to management webserver?

here is the customizer (to disable TRACE for Undertow)

public class UndertowCustomizer implements
  WebServerFactoryCustomizer<ConfigurableUndertowWebServerFactory> {

@Override
public void customize(final ConfigurableUndertowWebServerFactory undertowWebServerFactory) {
  undertowWebServerFactory.addDeploymentInfoCustomizers(deploymentInfo ->
      deploymentInfo.addInitialHandlerChainWrapper(handler ->
          new DisallowedMethodsHandler(handler, HttpString.tryFromString(HttpMethod.TRACE.name())))
  );
 }
}

A reproducible test case is at https://github.com/ranarula/WebServerCustomizer

Filing the ticket based on the discussion with @snicoll & @bclozel on Gitter

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the linked WebServerCustomizer example and its UndertowCustomizer. Trace how WebServerFactoryCustomizer is applied to the main and management webservers, then verify that the documented or implemented behavior makes the customizer available to the management webserver as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.