BigCommerce API是否支持CORS? [英] Is BigCommerce API supports CORS?

查看:219
本文介绍了BigCommerce API是否支持CORS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在应用程序安装期间与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调用信息,请使用一个安全的网络服务,返回非常具体的值到您的脚本,而不是直接调用。

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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