Package org.eclipse.jetty.server
Class HostHeaderCustomizer
java.lang.Object
org.eclipse.jetty.server.HostHeaderCustomizer
- All Implemented Interfaces:
HttpConfiguration.Customizer
@Deprecated(since="2021-05-27")
public class HostHeaderCustomizer
extends Object
implements HttpConfiguration.Customizer
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
Customizes requests that lack the
Host header (for example, HTTP 1.0 requests).
In case of HTTP 1.0 requests that lack the Host header, the application may issue
a redirect, and the Location header is usually constructed from the Host
header; if the Host header is missing, the server may query the connector for its
IP address in order to construct the Location header, and thus leak to clients
internal IP addresses.
This HttpConfiguration.Customizer is configured with a serverName and
optionally a serverPort.
If the Host header is absent, the configured serverName will be set on
the request so that ServletRequest.getServerName() will return that value,
and likewise for serverPort and ServletRequest.getServerPort().
-
Constructor Summary
ConstructorsConstructorDescriptionHostHeaderCustomizer(String serverName) Deprecated.HostHeaderCustomizer(String serverName, int serverPort) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(Connector connector, HttpConfiguration channelConfig, Request request) Deprecated.
-
Constructor Details
-
HostHeaderCustomizer
Deprecated.- Parameters:
serverName- theserverNameto set on the request (theserverPortwill not be set)
-
HostHeaderCustomizer
Deprecated.- Parameters:
serverName- theserverNameto set on the requestserverPort- theserverPortto set on the request
-
-
Method Details
-
customize
Deprecated.- Specified by:
customizein interfaceHttpConfiguration.Customizer
-