Comments (4)
Hi Matt, thanks for reporting an issue :)
This error message is, in fact, not related to the implementation of the Smart Link SDK. For security reasons, Kontent checks the origin of all incoming iframe messages and compares it with the provided preview URLs. Web Spotlight is not the only place where we use that check, for example, the origin of custom element messages is checked too.
ďťżA possible workaround to this approach would be to initialize the SDK in another iframe on your website, where the website itself would act as a middleware for exchanging messages between Kontent and the SDK iframe. This is further described in a separate issue in the SDK's repository: #16
We will try to find a solution to your problem (and we will consider adding some kind of secret to communication).
from smart-link.
Hi @vladbulyukhin the issue we are experiencing is almost identical to what Matt posted.
I was looking to get a bit more clarity on what the workaround implementation might look like. In terms of your proposed solution, would I be correct in that the content of the "proxy" iframe would need to be hosted on the same domain as the original preview url?
from smart-link.
The important thing is for the URL of the first iframe to match the preview URL set in the project settings in Kontent. The content of the internal iframe can then be hosted on a different domain.
from smart-link.
Understood, thanks @vladbulyukhin
from smart-link.
Related Issues (19)
- Border not rendered if the element is big
- Make controls' z-index configurable HOT 4
- Developer toolbar
- Website with SDK cannot be used inside of an iframe (other than WS) HOT 1
- Add a Troubleshooting section to docs and cover the X-Frame-Options
- Vue.js smart links are not highlighted on the first load HOT 1
- Links are not highlighted HOT 1
- Make smart link injection possible without a query parameter
- SDK does not work outside of browser
- CSS properties are overriden - causing spotlight overlay to not display
- Missing data-kontent-language-codename attribute logs project ID error to console.
- data-kontent-add-button only functions if content item id and element codename are on the same HTML tag
- Add button toolbar is not fully visible on the edge of the screen
- Use environment ID instead of project ID
- Add helper methods for creating attributes
- Add developer mode to see all buttons outside WSL
- Add option to hide features
- Allow edit item button outside Web Spotlight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smart-link.