To help protect against clickjack attacks, prevent external sites from loading your
Visualforce pages in an inline frame (iframe). Optionally, you can allow trusted external sites to
frame your Visualforce pages.
Required Editions
Available in: both Salesforce Classic and Lightning Experience
Available in: Contact Manager, Group, Professional,
Enterprise, Performance, Unlimited, and Developer
Editions
User Permissions
Needed
To modify session security settings:
Customize Application
Allowlist domains that currently frame your Visualforce pages.
To preserve existing functionality, complete this steps before you enable clickjack
protection for Visualforce pages.
Add each domain that you trust to the Trusted Domains for Inline Frames allowlist in
Session Settings. If you use custom domains or managed packages, include those domains
in the allowlist as well. For more information, see Specify Trusted Domains for Inline Frames in Salesforce Help.
From Setup, in the Quick Find box, enter Session Settings, and
then select Session Settings.
The two settings under Clickjack Protection for Visualforce pages refer to whether
headers are enabled. The apex:page field showHeader indicates whether headers are enabled on a page.
To allow other Visualforce pages to frame Visualforce pages with headers enabled,
select Enable clickjack protection for customer Visualforce pages with standard
headers.
To allow other Visualforce pages to frame Visualforce pages with headers disabled,
select Enable clickjack protection for customer Visualforce pages with headers
disabled.
Save your changes.
When you save your session settings with at least one of the options enabled, the CSP
frame-ancestors HTTP response header for the
corresponding Visualforce pages is set to 'self'. And
any trusted domains for inline frames for Visualforce pages included in the same HTTPS
response header.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.