【发布时间】:2019-06-25 03:43:23
【问题描述】:
API 调用出错
ERROR => 从源“http://localhost:8101”访问“localhost:3003/graphql”处的 XMLHttpRequest 已被 CORS 策略阻止:跨源请求仅支持协议方案:http、data、chrome、chrome-extension ,https。
apollo: Apollo,
httpLink: HttpLink
) {
apollo.create({
link: httpLink.create({ uri: 'localhost:3003/graphql}),
cache: new InMemoryCache()
});
为所有来源启用 CORS(节点 Api)
【问题讨论】:
标签: ionic4