Record Class RemoteIp.Header

java.lang.Object
java.lang.Record
org.springframework.boot.tomcat.RemoteIp.Header
Record Components:
host - name of the HTTP header from which the remote host is extracted or null to keep default
port - name of the HTTP header used to override the original port value or null to keep default
remoteIp - name of the HTTP header from which the remote IP is extracted or null to keep default
protocol - name of the HTTP header that holds the incoming protocol or null to keep default
protocolHttpsValue - value of the protocol header indicating whether the incoming request uses SSL or null to keep default
Enclosing class:
RemoteIp

public static record RemoteIp.Header(@Nullable String host, @Nullable String port, @Nullable String remoteIp, @Nullable String protocol, @Nullable String protocolHttpsValue) extends Record
Remote IP header settings.
Since:
4.2.0
Author:
Phillip Webb
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • host

      public @Nullable String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • port

      public @Nullable String port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • remoteIp

      public @Nullable String remoteIp()
      Returns the value of the remoteIp record component.
      Returns:
      the value of the remoteIp record component
    • protocol

      public @Nullable String protocol()
      Returns the value of the protocol record component.
      Returns:
      the value of the protocol record component
    • protocolHttpsValue

      public @Nullable String protocolHttpsValue()
      Returns the value of the protocolHttpsValue record component.
      Returns:
      the value of the protocolHttpsValue record component