我想在应用程序安装期间与 BigCommerce 交换信息,并从 html 页面发送代码的 POST 请求.但是我一直被 CORS 阻止:请求的资源上没有 'Access-Control-Allow-Origin' 标头.".而且我在 BigCommerce API 文档中找不到任何相关信息.
I want to exchange information with BigCommerce during application installation and send POST request for code from html page. But I keep getting blocked by CORS: " No 'Access-Control-Allow-Origin' header is present on the requested resource.". And I cannot find anything about it in BigCommerce API documentation.
有人知道吗,支持吗?有没有办法在浏览器中从 javascript 调用 BigCommerce api?
Do somebody know, is it supported? Is there any way to call BigCommerce api from javascript in browser?
我们不支持 CORS.尝试在浏览器中直接从 javascript 调用 API 是非常不安全的.这会公开一个 API 令牌,使某人能够通过基本身份验证访问存储中可用的任何数据.这将包括 PII.
We do not support CORS. It is very insecure to try to call the API from javascript on in the browser directly. This exposes an API token which enables someone to have access to any data in the store available through basic authentication. This would include PII.
如果您确实需要从 API 调用信息,请使用安全的 Web 服务,该服务会向您的脚本返回非常具体的值,而不是直接调用它.
If you really need to call info from the API, please use a secure web service that returns very specific values to your script as opposed to calling it directly.
这篇关于BigCommerce API 是否支持 CORS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
即使在调用 abort (jQuery) 之后,浏览器也会等待Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在调用 abort (jQuery) 之后,浏览器也会等待 ajax 调用
JavaScript innerHTML 不适用于 IE?JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
XMLHttpRequest 无法加载,请求的资源上不存在“AXMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资
XHR HEAD 请求是否有可能不遵循重定向 (301 302)Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
XMLHttpRequest 206 部分内容XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
XMLHttpRequest 的 getResponseHeader() 的限制?Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)