-1

I wish to host both an Angular and a Neuroglancer app from the same domain. I am looking to embed Neuroglancer in my Angular app via an iframe and wish to read the url which Neuroglancer generates dynamically. In order to read the url from the iframe and not generate a cross site scripting error both apps need to be hosted from the same domain. Is this possilbe and if so can anyone point me to a resource on how to do this?

afriedman111
  • 1,925
  • 4
  • 25
  • 42

1 Answers1

1

If you're running both apps in the same server you can use a reverse-proxy to do this. This answer talks more about how to accomplish this.

In the case you're running each app in a different server, you can use subdomains and NS records as this answer explains.

About the cross-site error, this answer has some links on how to deal with it keeping multiple domains. I don't know if it refers to your case but it's a good reference.

Joundill
  • 6,828
  • 12
  • 36
  • 50
Dan PZ
  • 146
  • 8