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?


Use this:

<aura:component implements="flexipage:availableForAllPageTypes"

    <aura:attribute name="vfHost" type="String"

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


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