I have CODE setup on https://docs.domain.ca which I have a custom web app pointing to this with the code setup working and have an iframe that shows the documents.
So everything is working, and I can open and save documents which save automatically.
Where things start failing is with cross-origin issues. When I open a doc, in the console immediately I get
Blocked autofocusing on a <div> element in a cross-origin subframe.
Then I fiddled with trying to print (I think it tries to open another window), it fails and I get these errors:
Refused to frame '' because it violates the following Content Security Policy directive: "frame-src 'self' https://rating.collaboraonline.com https://rating.collaboraonline.com blob:".
bundle.js:22209 Uncaught SecurityError: Failed to read a named property 'print' from 'Window': Blocked a frame with origin "https://docs.domain.ca" from accessing a cross-origin frame.
at NewClass._onIframeLoaded (bundle.js:22209:73)
In apache2 I have tried playing with the following
From my custom app which is just domain.ca, I have this in apache which is where CODE is
Header set Content-Security-Policy: "frame-ancestors https://docs.domain.ca https://docs.domain.ca:9980 "
Header set Content-Security-Policy: "frame-src https://docs.domain.ca https://docs.domain.ca:9980 blob:;"
I even tried vise versa, and went into my docs.domain.ca in apache to add
Header set Content-Security-Policy: "frame-ancestors https://domain.ca https://domain.ca:9980 "
Header set Content-Security-Policy: "frame-src https://domain.ca https://domain.ca:9980 blob:;"
I also tried with these host to just allow it all. But nothing is working so I must be doing something wrong
Header set Access-Control-Allow-Origin "*"
What am I doing wrong to allow my domain.ca to accept cross-origin?