0

I used an iframe to embed my visualforce page in a lightning component, but the page is showing me the error: Refused to display, in a frame because it set 'X-Frame-Options' to 'deny'. is this because my VF page is calling web services? if so, what could be done?

0

Use this:

<aura:component implements="flexipage:availableForAllPageTypes"
                access="global">

    <aura:attribute name="vfHost" type="String"
            default="yourdomain-dev-ed--c.na35.visual.force.com"/>

    <iframe aura:id="vfFrame" src="{!'https://' + v.vfHost + '/apex/myvfpage'}"/>

</aura:component>

I have tried embedding a visualforce inside a lightning component and also tried sending data from Lightning to Visualforce. In case you need it, here's a reference: Communicating between Lightning Components and Visualforce Pages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy