If an IP address doesn't have a hostname set in the hosts
file, and it also doesn't have a binding domain name, then what is its hostname, the IP address itself? Since same-origin policy asks for the same host
, not for the same IP, so it must have a hostname.
If you are trying to access from the same machine it can be accessed via:
P.S. If you are on a different machine and no domain is mapped to the IP address, then IP address itself will be the host name until a domain is explicitly mapped to it. You might have to do some additional setup depending on your use case to make it remotely accessible.