0

Is it possible to add a frame-ancestor header only for a specific site in our multisite Sitecore environment? What I saw were articles suggesting to add the header in the web.config but that would add the header to all sites then, wouldn't it? I also saw articles that has a module for it but it's only for SXA (our site isn't built on SXA).

I can attempt to override the XFrameOptionsHeaderModule but that doesn't seem like good practice.

1 Answer 1

2

For adding a frame-ancestor header only for a specific site in non SXA website you have to do customization, SXA have this feature. You can take reference from below link in non SXA website.

https://www.sitecorenutsbolts.net/2018/07/27/Sitecore-SXA-Using-HTTP-Headers-to-Secure-Your-Site/

Hope this helps you.

1
  • Pipelines, of course! I followed the implementation mentioned in the link you provided but modified it to read a configuration instead of it being configurable in the Content Editor.
    – Lala
    Commented Feb 7, 2023 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.