Sin*_*ina 4 couchdb cors jelastic ionic2
我正在尝试在 flow.ch 上从 Cloudant 迁移到 Jelastic。在本地测试(离子服务)时,我遇到了 pouchdb 的 CORS 错误。
除了我缺少的 CouchDB 之外,Jelastic 中还有其他配置吗?
XMLHttpRequest 无法加载http://xxx.flow.ch/xxx。对预检请求的响应未通过访问控制检查:当请求的凭据模式为“包含”时,响应中“Access-Control-Allow-Origin”标头的值不得为通配符“*”。因此,不允许访问Origin ' http://localhost:8100 '。XMLHttpRequest 发起的请求的凭证模式由 withCredentials 属性控制。
不能同时设置
origins = *
和credentials = true
选项
因此,如果您希望具有凭据的跨域请求与 couchdb 一起使用,则必须将该origins
值设置为允许来源的显式列表;例如:
[cors]
origins = http://localhost, https://localhost, http://couch.mydev.name:8080
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1444 次 |
最近记录: |