cancel
Showing results for 
Search instead for 
Did you mean: 

OpenDocument Domain Relaxing for BSP Integration

0 Kudos

Hi,

we would like to build an application, where we communicate via JavaScript between a BSP parent application and Design Studio child applications.

However, we receive cross-origin policy errors when trying to access the various frames, although they are located within the same 2nd level domain.

Our simplified setup is

  • parent frame: BSP application with JS code A and a content OpenDocument iframe at subdomainA.domain.com
  • OpenDocument iframe: OpenDocument wrapper that calls a DS application at subdomainB.domain.com
  • Design Studio iframe: rendered DS app with JS code B at subdomainB.domain.com

Now JS code A and JS code B should communicate.

Unfortunately, it seems that the OpenDocument iframe is not performing any domain relaxation, i.e. the value of the document.domain property is always remaining initial. The Design Studio iframe performs domain relaxation by default. Now the OpenDocument iframe is not accessible at all from any other frame, since the browser apparently includes the port in the domain validation.

The last issue is also described in this post, albeit in a different context:

javascript - What does document.domain = document.domain do? - Stack Overflow

Does somebody have a suggestion, how we can trigger the domain relaxation in the OpenDocument iframe to enable the JS communication?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jorg,

I have no idea about BSP but the error that you are facing related to CORS. You can read more about it here - enable cross-origin resource sharing

0 Kudos

Hi Mohanraj,

thanks, I am aware of the CORS architecture. The issue is, that I don't know how enable it across the OpenDocument iframe, since I am not aware of any way how to execute the required JavaScript code in this iframe to allow the required domain relaxing.