尝试从我的域重定向到另一个域时,我遇到了一个奇怪的错误。这就是我想要做的:
location.href="https://paystack.com/secure/xxx"
这是错误:
Failed to load https://paystack.com/secure/xxx: 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:59610' is therefore not allowed access
我能做些什么才能通过这个?
答案 0 :(得分:-3)
我终于开始工作了。 这就是我所做的
window.location.replace('domain');
window.location.href ='domain'