给unraid装了个Nextclound, 方便在外网的情况下下载一些常用的小软件, 虽然百度一下都找得到, 但是总是没有自己提前归档好方便, 结果安装完成过后遇到了不少问题
1.按照官方推荐的方式, 网络类型使用了
Custom : br0
, 结果装好过后发现, unraid下根本ping不通这个ip, 其他电脑都正常, 暂时不知道咋回事, 改为Bridge
, 并手动指定了端口转发, 把80
转发到了813
上
2.安装完成过后, 访问结果提示
通过不被信任的域名访问请联系您的管理员。如果您就是管理员,请参照 config.sample.php 中的示例编辑 config/config.php 中的 "trusted_domains" 设置。配置此项的详细内容请查阅 文档。
解决方案
编辑
config/config.php
文件, 增加如下配置(替换成自己的内网ip和绑定的域名(如果有的话))
'trusted_domains' =>
[
'192.168.7.24',
'xxx.xxx.com'
],
3.现在可以打开登录页面了, 结果点了登录一直转圈圈, 打开调试面板显示错误
Refused to send form data to 'https://xxx.xxx.com/login' because it violates the following Content Security Policy directive: "form-action 'self'".
解决方案(并没有解决)
编辑
lib/public/AppFramework/Http/ContentSecurityPolicy.php
文件, 增加或修改如下配置
protected $allowedFormActionDomains = [
'\'self\'',
'https://*.xiaoc.cn',
'http://192.168.7.24'
];
结果发现并没有解决...登录还是转圈, 但是再刷新一下就好了....