1

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?

2

1 Answer 1

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

You must log in to answer this question.