美文网首页
nginx safe conf

nginx safe conf

作者: xun2019 | 来源:发表于2020-07-27 15:45 被阅读0次
    
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
    
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
    
        access_log  /var/log/nginx/access.log  main;
        sendfile        on;
        keepalive_timeout  65;
    
        #add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options nosniff;
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
        add_header Content-Security-Policy "frame-ancestors http://localhost:63342 https://www.o1.com https://v.o1.com";
    
        include /etc/nginx/conf.d/*.conf;
    }
    
    

    相关文章

      网友评论

          本文标题:nginx safe conf

          本文链接:https://www.haomeiwen.com/subject/pfizlktx.html