【问题标题】:Using InfCloud with Baikal and Nginx将 InfCloud 与 Baikal 和 Nginx 一起使用
【发布时间】:2016-03-27 16:00:21
【问题描述】:

我的服务器正在运行 Baikal 和 nginx,现在我想添加前端 InfCloud(可能称为 CalDavZap 或 CalDavMATE)。

贝加尔湖在https://mydomain:202/运行

我有calcard.php 来访问日历和联系人。该文件在https://mydomain:202/calcard.php/下可访问

现在我希望 InfCloud 在https://mydomain/cal 下运行。

用户和密码是test 我已经可以访问登录页面,但是登录时出现以下错误:

jquery-2.1.4.min.js:4 拒绝连接到“https://test:test@mydomain:202/calcard.php/principals/”,因为它违反了以下内容安全策略指令:“default-src 'self' 'unsafe-inline' 'unsafe-eval' ”。请注意,'connect-src' 没有显式设置,因此 'default-src' 用作备用。

[netCheckAndCreateConfiguration: 'PROPFIND https://mydomain:202/calcard.php/principals/'] 代码:'0' 状态:'error' - 参见https://www.inf-it.com/infcloud/readme.txt(跨域设置)

这些是我的配置:

InfCloud config.js

 var globalNetworkCheckSettings={
    href: 'https://mydomain:202/calcard.php/principals/',
    timeOut: 90000,
    lockTimeOut: 10000,
    //checkContentType: true,
    settingsAccount: true,
    delegation: true,
    additionalResources: [],
    hrefLabel: null,
    forceReadOnly: null,
    ignoreAlarms: false,
    backgroundCalendars: []
 }
 var globalUseJqueryAuth=true;

还有 nginx

location /cal {
    root /path/to/infcloud;
    dav_methods PUT DELETE MKCOL COPY MOVE;
    dav_ext_methods PROPFIND OPTIONS;
    index index.html;
    access_log      /var/log/nginx/infcloud.access.log;
    error_log       /var/log/nginx/infcloud.error.log;
}

【问题讨论】:

    标签: nginx http-headers


    【解决方案1】:

    您现在在 https://mydomain:202 上运行 Baikal,在 https://mydomain:443 上运行 infoCloud。也就是说,您正在运行跨域设置,并且正在使用与此类设置相关的保护机制。

    有很多方法可以解决这个问题,在您原始帖子中显示的 infoCloud 错误消息中引用的 readme.txt 中对它们进行了很好的解释。

    【讨论】:

    • 我将在 enable-cors.org/server_nginx.html 找到的行添加到 baikal 的配置中,并添加了 readme.txt 中提到的行。但我仍然得到同样的错误。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 2019-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多