Legacy Knowledge Base
Published Jul. 2, 2025

Does Liferay DXP 7.1 support HTTP headers?

Written By

Sivakumar Perumal

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Does Liferay DXP 7.1 support the following HTTP headers: "X-Frame-Options", "X-XSS-Protection" and "X-Content-Type-Options"? If not, what changes have to be done from the application side to enable the same

Environment

  • Liferay DXP 7.1

Resolution

  • Liferay portal is already secured with the following headers and it has been enabled by default. It has been described in the system.properties of Liferay DXP 7.1.
    #
        # Set this to true for the portal to send the "X-Frame-Options: DENY" HTTP
        # header to protect against clickjacking.
        #
        # Custom HTTP header values instead of "DENY" can be specified per URL via
        # the properties "http.header.secure.x.frame.options.*".
        #
        http.header.secure.x.frame.options=true
        #
        # Set this to nonempty value for the portal to send the "X-XSS-Protection"
        # HTTP header to block cross-site scripting attacks. Possible nonempty
        # values are "0", "1" and "1; mode=block"
        #
        http.header.secure.x.xss.protection=1
        #
        # Set this to true for the portal to send the "X-Content-Type-Options:
        # nosniff" HTTP header to protect against MIME sniffing. Custom URLs can
        # specified in the property
        # "http.header.secure.x.content.type.options.urls.excludes" that allow for
        # unhindered MIME sniffing.
        #
        http.header.secure.x.content.type.options=true
    Please refer to the below screenshot.
    Http_Security_Headers.png
  • As the HTTP security headers are enabled by default, no action is required to enable the same.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base