nextcloud系统默认是不允许自己的页面被其他网站以iframe的形式嵌入的
在这里可以将lib/private/legacy/OC_Response.php中的header('X-Frame-Options: SAMEORIGIN'); 注释掉
网上也有说在lib/public/AppFramework/Http/ContentSecurityPolicy中的
protected $allowedFrameDomains['http://172.18.109.105:81']及
protected $allowedFrameAncestors = [ '\'self\'', 'http://172.18.109.105:81', ]; 数组中加入允许嵌入页面的域名,但我没有用到这一步,在此记录下载作为备用 参考链接:https://help.nextcloud.com/t/embedding-nextcloud-iframe/81334 https://return2.net/nextcloud-enable-external-iframe/
更多精彩内容:各种AI课程、技能课程、黑科技软件、网站小程序源码、副业小项目、PPT模板等精品素材、电商课程、推广引流课程等,尽在 天边资源网 。