php - How to link external website to internal javascript page -
i have website lets call example.com , hosted @ external hosting provider. on site have page http://example.com/msg.php needs reference javascript intranet site lets running on example_intranet.com, have script reference like..
<script src="http://example_intranet.com/js/messaging.js" type="text/javascipt"> i'm aware of cross-domain security issues , have setup necessary cors on example.com site , pages.
when visit http://example.com/msg.php outside company network (example_intranet.com) works expected, when visit same page within (inside) network page doesn't appear resolve javascript include ..
any suggestions on how fix this?that able have reference javascirpt work inside network.
i'm guessing dns issue, not code. intranet url domain resolves different "internal" ip address when on company network, , when outside resolves public ip address.
theoretical scenario:
when in company network, intranet url gets resolved local ip, 192.x.x.x or 10.x.x.x. when visit page on external host machine trying find javascript file using internal ip, might looking inside network of external host, , won't find it.
as experiment, try changing path javascript file use public ip of intranet url instead of domain name.
Comments
Post a Comment