javascripthtmlaccount-kit

is possible put accountkit in iframe?


I have one requirement, the campaign page will embed the signup page of landing. like this

campaign page
______________________
| iframe signup page |
|   ________         |
|   |      |         |
|   |      |         |
|   ________         |
______________________

Accountkit in the signup page, but we got error when open accountkit

Refused to display 'https://www.accountkit.com/v1.1/dialog/sms_login/' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://mywebsite.com".

is this requirement possible, or do you have other suggestion?


Solution

  • Add the header in your web server response:

    Content-Security-Policy: default-src 'self' https://www.accountkit.com
    

    or meta tag

    <meta http-equiv="Content-Security-Policy" content="default-src 'self' https://www.accountkit.com">
    

    More info