0

I have two applications running on the same origin/server like app.myserver.com and portal.myserver.com. I embed a page from app.myserver.com to the portal.myserver.com using <embed>. How can I change the css style for the embed page from portal.myserver.com i.e I need to change/override the css style of the app from portal.

template inside the portal.server.com is as following

<object id="app-page" data="app.myserver.com/page" width="100%" height="100%">
    Error: Embedded data could not be displayed.
</object>

I can see the ispect element of the portal.myserver.com like below

<object id="app-page" data="app.myserver.com/page" width="100%" height="100%">
  #document
  <!DOCTYPE html>
  <html>
  <head><title>Hello</title></head>
  <body>
  <div class="first-div"><p>lorem ipsum</p></div>
</object>

I'm open to use any javascript or jquery solutions

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Lalas M
  • 1,116
  • 1
  • 12
  • 29
  • I don't believe this is possible due to the same origin policy. Note that despite your assertion that they are the same origin they are not, the subdomains are different. For this to work the domains need to match exactly, even down to the port being used. – Rory McCrossan Feb 07 '20 at 11:49
  • 1
    Your question title says they have the same origin, but your URLs have different origins! – Quentin Feb 07 '20 at 11:50

0 Answers0