Use > JMX Reference > Administration Methods > How to Enable Validation of Host Header of a Request

How to Enable Validation of the Host Header of a Request

To enable validation of host header of a request based on a regular expression,

  1. Access the UCMDB server JMX console: Launch a Web browser and enter the following address: https://<UCMDB machine name or IP address>:8443/jmx-console. You may have to log in with a user name and password (default user name: sysadmin).

  2. Locate UCMDB:service=Settings Services and click the link to jump to the Operations table.

  3. Locate the setGlobalSettingValue operation.

  4. To enable validation of host header of a request, provide values for the following parameters for the setGlobalSettingValue method:

    • name:

    • value: <enter a JAVA regex that matches a valid host>

      For example,

      • mymachine, will only accepts a host header that contains the value mymachine.
      • mymachine.*|localhost, will accept, or any domain starting with mymachine or localhost as host.

      The default value of the setting is .*. It affects URLs containing /ucmdb-ui/ only. For example, https://localhost:8443/ucmdb-ui/applet/applet.jsp.

  5. Click Invoke. The setting takes effect immediately.

  6. Restart the whole UCMDB cluster to ensure that the setting is picked up by all readers.