0

I need to display the external page in VF page iframe

But I'm getting www.salesforce.com refused to connect.

I added salesforce in CORS and csp sites Below is my code:

<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
    <apex:pageBlock >
        <apex:iframe src="https://www.salesforce.com" scrolling="true" id="theIframe"/>
    </apex:pageBlock>
</apex:page>

1 Answer 1

1

The ability to frame a page depends on the page's X-Frame-Options header. Salesforce doesn't allow framing as a security feature. You'll want to test with a page that allows being framed (the default if X-Frame-Options is not specified, or allowed by domain. As a side note, CORS settings do not affect frames, only JavaScript's ability to access cross-domain servers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .