我有我的服務器與貝加爾和nginx運行,現在我想添加前端InfCloud(也許知道CalDavZap或CalDavMATE)。使用InfCloud與貝加爾和Nginx
貝加爾在https://mydomain:202/
運行我有calcard.php
訪問日曆和聯繫人。該文件是可訪問的https://mydomain:202/calcard.php/
現在我想讓InfCloud在https://mydomain/cal
下運行。
用戶名和密碼是test
我已經可以訪問登錄頁面,但登錄時,會出現以下錯誤:
jQuery的2.1.4.min.js:4拒絕連接到'https://test:[email protected]:202/calcard.php/principals/因爲它違反了以下內容安全策略指令:「default-src'self''unsafe-inline''unsafe-eval'」。請注意,'connect-src'沒有明確設置,所以'default-src'被用作後備。
和
[netCheckAndCreateConfiguration: 'PROPFIND https://mydomain:202/calcard.php/principals/']代碼: '0' 狀態: '錯誤' - 見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;
}
我將這裏找到的幾行http://enable-cors.org/server_nginx.html添加到了貝加爾的配置中,並添加了readme.txt中提到的行。但我仍然得到同樣的錯誤。 – Jack