我现在使用 Nextcloud(在 Nginx 上)有一段时间了,我想将它 iframe 用于另一个网站。但是标题不接受我的指令。
我将 /var/www/nextcloud/lib/private/legacy/response.php 中的标头选项更改为以下内容:
header('X-Frame-Options: ALLOW-FROM https://example.com');
但是,当我使用 iframe 制作示例网页时,会出现以下错误:
Invalid 'X-Frame-Options' header encountered when loading 'https://nextcloud.example.com/apps/files/': 'ALLOW-FROM https://example.com' is not a recognized directive. The header will be ignored.
有谁知道为什么这不起作用?