Sometimes the current domain is builds and at other times it’s builds.example.com. I would like to call an AJAX request to the same domain as the current one (so that it doesn’t violate the same origin policy). How do I find the current domain? If that’s not possible, are there any other solutions to the problem?
Sometimes the current domain is builds and at other times it’s builds.example.com. I would
Share
There’s no need to find the current domain. Just use a partial URL: