I am trying to access remote server by calling its API. remote server does not allow access when i try to access it using localhost
for example:
XMLHttpRequest cannot load https://backendpublic.development.intern.xyz.com:8443/Gateway/dropdownLibrary?filter=%7B%22librarytype%22:2,%22active%22:1%7D. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9002' is therefore not allowed access.
And this is required behaviour from remote server because of security concerns so i should be able to access it using DNS names.
And when i try to access it using my systems DNS name like:
ws1066.intern.xyz.com:9002/.... (ws1066 is my system's DNS name)
then browser do nothing and in console i get following :
GET
http://ws1066.intern.xyz.com:9002/mtpView;id=ng_6933net::ERR_CONNECTION_REFUSED
I am totally clueless about this problem.
Thanks.