• Resolved Jay.Dub

    (@jaydub-1)


    When setting the X-Frame-Options to ALLOW-FROM it kills our site and the content is wiped from the .htaccess. Does anyone else have this issue?

    I need to allow a hubspot domain but cannot.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Jay.Dub

    (@jaydub-1)

    Plugin Author Andrea Ferro

    (@unicorn03)

    Hi @jaydub-1,

    Thank you for downloading the Headers Security Advanced & HSTS WP plugin. I’m Andrea, thanks for your feedback I wanted to update you that within a few hours I will release a patch of the plugin with the resolution of your issue.

    For any information or help I am here to help you

    Thread Starter Jay.Dub

    (@jaydub-1)

    That sounds good, many thanks.
    Is there a way to add multiple domains also?

    Plugin Author Andrea Ferro

    (@unicorn03)

    Hello @jaydub-1,

    Since the X-Frame-Options header with the ALLOW-FROM directive supports only a single URL per response (and is becoming obsolete in favor of Content Security Policy (CSP) for more granular controls), you should consider using CSP with the frame-ancestors directive if you need to specify multiple domains from which to allow embedding. This provides more flexibility and security.

    Thread Starter Jay.Dub

    (@jaydub-1)

    Much appreciated. Will your plugin control CSP moving forward?

    Plugin Author Andrea Ferro

    (@unicorn03)

    hello @jaydub-1,

    I try to constantly update the plugin and keep it with the latest STANDARDS from OWASP and Mozilla Dev.

    Thread Starter Jay.Dub

    (@jaydub-1)

    Does the ALLOW-FROM mean it’s the only domain allowed or is it an additional domain than the one the site is on?

    Plugin Author Andrea Ferro

    (@unicorn03)

    Hello @jaydub-1,

    The ALLOW-FROM directive in the context of web security headers, particularly the X-Frame-Options HTTP response header, specifies which domain is allowed to frame the content of the site. When you set X-Frame-Options: ALLOW-FROM https://example.com, it means that the page can only be framed by the specified domain (https://example.com in this case), and it is indeed the only domain allowed to do so, excluding even the site itself if it’s on a different domain.

    So, to directly answer your question: ALLOW-FROM means it’s the only domain allowed to frame the content, not an additional domain allowed alongside the domain the site is on. If you need to allow multiple domains or more complex framing policies, it’s recommended to use the Content Security Policy (CSP) header with the frame-ancestors directive instead, as X-Frame-Options is more limited in its capabilities.

    The X-Frame-Options header does not support the inclusion of multiple domains directly; it can only specify a single domain with the ALLOW-FROM directive. If you need to allow framing of your content from multiple domains, you should use the Content Security Policy (CSP) header with the frame-ancestors directive.

    Here is an example on how to set the CSP header to allow framing from multiple domains:

    Content-Security-Policy: frame-ancestors 'self' https://example.com https://anotherexample.com;

    In this example, ‘self’ allows framing from the same source as the document, while https://example.com and https://anotherexample.com are two other domains from which framing is allowed. You can add as many domains as you like by simply listing them one after the other.

    Remember that CSP offers many other features for securing your website besides controlling framing, so it is a good practice to explore all of its guidelines and apply a comprehensive CSP policy that fits your security needs.

    I hope I’ve given you good assitance and details on how the two headers work and if I have any other questions I’m available as soon as possible

    Thread Starter Jay.Dub

    (@jaydub-1)

    Very helpful, many thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Critical error when…’ is closed to new replies.