Vaadin cross-origin frame issue

Hi

How do you solve the issue with cross-origin frame issue in Vaadin. I am trying to use BrowserFrame and I think this creates an iframe and does not allow to access the site. It says:


Blocked a frame with origin " " from accessing a cross-origin frame.

Is there any workaround for this?

Same-origin policy is a security constraint of browsers. Without it there could be huge security problems. There isn’t a direct workaround, the actual implementation depends on what you are actually trying to archieve.

For more info, I recommend, for example, checking out either
this
,
this
or
this
StrackOverFlow thread.

Hi Tapio,

Thanks for your response. I am trying to use Vaadin’s BrowserFrame and display the content of the external site. However, I cannot do so, because of this “same-origin policy.”

Can we embed applications made in AngularJS, JS and others inside Vaadin application? I don’t think it is so trivial with the framework.

Well, you can embed anything inside a Vaadin app using an iFrame if you follow the security rules. But naturally you’ll get problems if you want to communicate with the ‘others’. And that depends on the case.

Do you have some kind of example, or even a project, that you could post here? It differs a lot from case-to-case how the embedding should actually be done.

I am using new
Vaadin Designer
and trying to communicate with this ‘other’ site.

Here is the code of
mydesign.html

[code]

ds123456 dss12345 test button [/code]Here is the code for [i] MyDesign.java [/i]
/**
 * !! DO NOT EDIT THIS FILE !!
 *
 * This class is generated by Vaadin Designer and will be overwritten.
 *
 * Please make a subclass with logic and additional interfaces as needed,
 * e.g class LoginView extends LoginDesign implements View { … }
 */
@DesignRoot
@AutoGenerated
@SuppressWarnings("serial")
public class MyDesign extends CssLayout {
    protected Button ds123456;
    protected Button dss12345;
    protected Button testButton;
    public MyDesign() {
        Design.read(this);
    }
}