android - 如何允许所有 HTTPS URL 在 CouchbaseLite Android 中同步

标签 android https replication couchbase-lite

我有一个使用 Couchbase Lite 的应用程序。直到现在我一直在使用 http,现在我们需要确保安全。那么如何让所有的 HTTPS URL 与 CouchbaseLite Android 同步呢?

最佳答案

Configuring SSL它指出的 Sync Gateway 文档部分:

Sync Gateway supports serving SSL. To enable SSL, you need to add two properties to the config file:

  • "SSLCert": A path to a PEM-format file containing an X.509 certificate or a certificate chain.
  • "SSLKey": A path to a PEM-format file containing the certificate's matching private key.

If both properties are present, the server will respond to SSL (and only SSL) over both the public and admin ports.

要使同步网关能够使用 https,请按照 Configuring SSL 配置 SSLCertSSLKey文档。配置证书后,Couchbase Sync Gateway 将使用 https。

事实上,如果您继续使用 http URL,客户端将无法连接。 Sync Gateway 不支持同时的 http 和 https,它支持其中之一。并且启用 https 不会更改同步网关使用的端口。

关于android - 如何允许所有 HTTPS URL 在 CouchbaseLite Android 中同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33676306/

相关文章:

android - 从矩阵获取坐标和宽度/高度

docker - 在反向代理后面运行 Neo4J (web) 并连接到 "bolt://localhost:7687"

Postgresql:1表的主从复制

couchdb - 使用 CouchDB 进行跨重启的永久连续复制

mongodb - 与删除的成员形成一个新的副本集

android - 滚动时单击不在 CoordinatorLayout 中的 RecyclerView 上工作

android - 为什么 ColorStateList 的按下状态不能与 ListView 项目一起使用?

java - 我可以在 Android 拔下电源并处于 hibernate 状态时唤醒它吗?

bash - Docker:https的wget不起作用

rest - http-only 站点来测试 REST 请求?