AJAX错误:TypeError:' arguments',' callee'和' caller'在这种情况下无法访问 [英] AJAX Error: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context

查看:81
本文介绍了AJAX错误:TypeError:' arguments',' callee'和' caller'在这种情况下无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在系统上进行API调用,并且收到此错误.我可以使用curl和Postman使用相同的URL来获得响应,但是使用Angular的$ http.get()方法时,Safari会引发此错误.

I'm doing an API call on a system and am receiving this error. I can get a response with curl and Postman with the same URL, but safari throws this error when using Angular's $http.get() method.

这也将在生产中起作用.该错误仅在开发过程中发生.

This will also work in production. The error only occurs during development.

搜索此错误会出现类似但不同的问题.

Searching this error turns up similar, but different questions.

推荐答案

我发现此错误实际上是X起源的问题.

I found out that this error is actually a X-origin issue.

如果仅在开发期间遇到此问题,请在Safari中禁用开发"菜单中的X来源限制.否则,您可以从这里找到一些处理X来源问题的解决方案.但是至少现在您会知道该错误的可能原因.

If you are only experiencing this during Dev, in Safari, just disable X-origin restrictions in the Develop menu. Otherwise, from here, you can find a few solutions on handling X-origin issues. But at least now you'll know a possible cause of the error.

我希望这对某人有帮助!

I hope this helps someone!

这篇关于AJAX错误:TypeError:' arguments',' callee'和' caller'在这种情况下无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆