You can use the HostNameValidator to ensure that a hostname is valid. The HostNameValidator validates configured host names by validating the hostname in the “Host” header of an incoming HTTP request. The header value is validated against a list of configured known hostnames or known host patterns. You can configure aliases of the local host, or explicitly specify hostnames or host name patterns.

RedirectURLValidator uses the known host configuration from HostNameValidator to avoid duplication of the configuration.

The HostNameValidator component includes the properties described in the following table.

Property

Description

allowLocalHost

If this Boolean property is set to true, HostNameValidator allows redirection to localhost and synonyms for it. Synonyms for localhost are defined by the /atg/dynamo/service/LocalHostConfiguration component.

Even when this property is set to true, the LocalHostConfiguration component may not successfully discover all aliases for the localhost. If this happens, add aliases for your localhost to the allowedHostNames property of the RedirectURLValidator component.

allowedHostNames

HostNameValidator will allow redirection to any hostname that you include in this String array property.

allowedHostRegexes

HostNameValidator will allow redirection to any hostname that matches one of the regular expressions that you include in this String array property.


Copyright © 1997, 2019 Oracle and/or its affiliates. All rights reserved. Legal Notices