Skip to main content
Question

How to set CSP: frame-ancestors

  • December 22, 2021
  • 3 replies
  • 1273 views

Bahtiyar_Ahmidi

Hello friends,

I was trying to embed a website of mine into my Figma plugin, but I come across this error:

Then I added some response headers to my backend code for the website:

But the error still keeps appearing. Does anyone have any idea?

3 replies

Gleb
  • Power Member
  • 4708 replies
  • December 22, 2021

How are you trying to embed it? Don’t draw another iframe, set the window.location to your site.


Bahtiyar_Ahmidi

Yes, I did draw another iFrame, is there any way to make it work? And if there’s not, can you tell me why?


Gleb
  • Power Member
  • 4708 replies
  • December 25, 2021

I don’t know but I would guess you can’t embed a website iframe in a “non-website” iframe that a Figma plugin window is (I don’t know the technical terms/differences for these). So you first need to use window.location to turn the outer iframe into a real website iframe (so it has a URL) and then you may be able to embed another iframe in it.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings