Я пытаюсь создать приложение React на странице visualforce с помощью молнии. Когда я нажимаю предварительный просмотр в настройках visualforce, все в порядке.
![enter image description here](https://i.stack.imgur.com/lwhe9.png)
But when I use it in Lightning app builder it does not work. It shows
![enter image description here](https://i.stack.imgur.com/yghnk.png)
The error: Refused to frame 'https://mirage-video-dev-ed--ltng.container.lightning.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://mirage-video-dev-ed--c.visualforce.com".
Also really weird that if I right click and choose "Reload frame", it works.
![enter image description here](https://i.stack.imgur.com/9R8xS.png)
Visualforce code
$Lightning.use("c:myFirstApp", function() {
$Lightning.createComponent("lightning:container",
{ src: "{!$Resource.hello + '/index.html'}"},
"hello",
function(cmp) {
console.log("created");
// do some stuff
}
);
});
myFirstApp
Есть способ исправить? Я не могу найти способ загрузить приложение aura: напрямую, поэтому, если есть способ, покажите мне.