Php nginx X-Frame-Options仍然具有相同的值

Php nginx X-Frame-Options仍然具有相同的值,php,web-services,magento,nginx,Php,Web Services,Magento,Nginx,我曾经 添加标题X-Frame-Options SAMEORIGIN 在nginx中,但当我移除它时;它仍然具有相同的值,因为我无法在我的网站中使用iFrame,并出现以下错误: 拒绝在帧中显示“xxx”,因为它将“X-frame-Options”设置为“SAMEORIGIN” 删除此配置并重新启动nginx和php fpm,然后重试 添加标题X-Frame-Options“ALLOWALL” Nginx配置: server { server_tokens off; access

我曾经

添加标题X-Frame-Options SAMEORIGIN

在nginx中,但当我移除它时;它仍然具有相同的值,因为我无法在我的网站中使用iFrame,并出现以下错误:

拒绝在帧中显示“xxx”,因为它将“X-frame-Options”设置为“SAMEORIGIN”

删除此配置并重新启动nginx和php fpm,然后重试

添加标题X-Frame-Options“ALLOWALL”

Nginx配置:

server {
    server_tokens off;
    access_log  off;
    listen 80 default;
    server_name www.example.com *.example.com; 
    root /var/www/vhosts/example.com;

    location / {
        index index.html index.php; 
        try_files $uri $uri/ @handler; 
        expires 30d; 
      if (!-e $request_filename) {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }
    }

    set $ssl "off";
    if ($http_x_forwarded_proto = "https") {
    set $ssl "on";
    }


    location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
         access_log        off;
         log_not_found     off;
         expires           30d;
     }


    location @handler { 
        rewrite / /index.php;
                                   }

    location ~ .php/ { 
        rewrite ^(.*.php)/ $1 last;
    }

    location ~ .php$ { 
        if (!-e $request_filename) { rewrite / /index.php last; }

        expires        off;
        fastcgi_pass  unix:/var/run/php-fpm/example.sock;
        fastcgi_param  HTTPS $fastcgi_https;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  MAGE_RUN_CODE default; 
        fastcgi_param  MAGE_RUN_TYPE store;
        fastcgi_buffer_size 1024k;
        fastcgi_buffers 512 32k;
        fastcgi_busy_buffers_size 1024k;
        fastcgi_temp_file_write_size 1024k;

        include        fastcgi_params; ## See /etc/nginx/fastcgi_params
    }
}
使用inspect元素检查时,在标题中找到以下内容:

X-Frame-Options:ALLOW-FROM https://www.youtube.com/
X-Frame-Options:SAMEORIGIN

因此,不知何故添加了X-Frame-Options,但找不到它

我自己也能找到。我所做的是,当我看到它不工作时,我在.html文件中快速更改并保存了它。在那之后,它起了作用

例如:
我在nginx上运行了一个文件,比如index.html。我删除了
add_标题X-Frame-Options-DENY行在
nginx.conf
中,重新启动了服务器,但没有运气。它一直否认。它表现得好像根本没有变化,而变化就在那里。我所做的是,我在
index.html
中更改了一行(或者只是添加了一个空格。只要做任何更改),保存了更改,然后重新启动服务器并。。。瞧:成功了

您的问题是什么?为什么在从nginx配置中删除x-frame-options后仍出现以下错误?>拒绝在帧中显示“xxx”,因为它将“X-frame-Options”设置为“SAMEORIGIN”。您应该发布您的nginx配置nginx配置已添加(添加标题X-frame-Options SAMEORIGIN;)在配置中,但已删除。我还是会犯同样的错误。无法从DENY后退。我遇到了这个问题,NGINX显示header选项设置为DENY,但仍然在iFrames中为页面提供服务。我编辑了index.html并重新启动了nginx,它突然工作了。希望有人能参与进来。谢谢我猜nginx提供文件的缓存版本,直到它检测到文件中的任何更改,并且头已经附加到缓存版本中。