You need to sign in to do that
Don't have an account?
Francesco Dessì
X-Frame-Options = Deny
Hi,
In a Community page, I have an LWC whit a Visualforce page embedded with an Iframe.
Everything works fine, but when I load the page with Chrome in incognito mode I the get the error:
Refused to display 'https://……………' in a frame because it set 'X-Frame-Options' to 'deny'
and the visulaforce page does't appear.
On salesforce.stackexchange (https://salesforce.stackexchange.com/questions/224145/iframed-vf-page-fails-in-lightning-component-in-community-page), I've found a solution that works for my case.
In summary:
All Answers
Communities have their own Clickjack protection settings that may need to be adjusted to allow the use of iFrames in the Visualforce pages.
To check the Clickjack settings in the community follow these steps:
- Gear icon | Setup | Feature Settings | Communities | All Communities
- Click on the Workspaces (Next to community name)
- Click on the Administration Panel | Click on Pages
- Under Advanced Customizations, click Go to Force.com.
- In the Site detail, on the right-hand side, you can see the clickjack protection level for the community.
- Click the Edit button and adjust the Clickjack protection level.
For community sites, if you set clickjack protection to the level for the most protection, certain pages appear as blank pages. To avoid this problem, use the recommended setting.Please see the article for more information: https://help.salesforce.com/articleView?id=000319416&type=1&mode=1
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
thanks for the answer. I took your advice, but the problem persists.
On salesforce.stackexchange (https://salesforce.stackexchange.com/questions/224145/iframed-vf-page-fails-in-lightning-component-in-community-page), I've found a solution that works for my case.
In summary: