The difference between the local page and the page pulled from the web server is profound (not "weird") from a security standpoint: the latter is going to fail a same-origin check.
There is a line in there showing you the config change required, but the general discussion shows why it's not necessarily going to work for deployment.