Repository navigation
docs:Update the FAQ document - #861
Merged
Merged
Conversation
|
|
||
| server { | ||
| listen 80; | ||
| server_name localhost; |
Contributor
Comment on lines
+143
to
+145
| add_header X-Frame-Options "SAMEORIGIN" always; | ||
| add_header X-XSS-Protection "1; mode=block" always; | ||
| add_header X-Content-Type-Options "nosniff" always; |
Contributor
There was a problem hiding this comment.
X-XSS-Protection 响应头已被弃用,不推荐使用,因为它可能在现代浏览器中引入安全漏洞。建议移除此响应头。同时,建议添加 Referrer-Policy 以增强隐私保护。
Suggested change
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-XSS-Protection "1; mode=block" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
Comment on lines
+169
to
+171
| add_header X-Frame-Options "SAMEORIGIN" always; | ||
| add_header X-XSS-Protection "1; mode=block" always; | ||
| add_header X-Content-Type-Options "nosniff" always; |
Contributor
There was a problem hiding this comment.
可以加强此 HTTPS 服务块的安全响应头。X-XSS-Protection 响应头已被弃用,应予以移除。更重要的是,应添加 Strict-Transport-Security (HSTS) 响应头,以确保浏览器只通过 HTTPS 连接到您的站点。同时,也建议考虑添加 Referrer-Policy 响应头以增强隐私保护。
Suggested change
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-XSS-Protection "1; mode=block" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | |
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-Content-Type-Options "nosniff" always; |
Comment on lines
+301
to
+303
| add_header X-Frame-Options "SAMEORIGIN" always; | ||
| add_header X-XSS-Protection "1; mode=block" always; | ||
| add_header X-Content-Type-Options "nosniff" always; |
Contributor
There was a problem hiding this comment.
与另一个 HTTPS 服务块类似,这里的安全响应头可以得到改进。X-XSS-Protection 响应头已被弃用,应予以移除。添加 Strict-Transport-Security (HSTS) 响应头来强制执行 HTTPS 非常重要。也请考虑添加 Referrer-Policy 响应头。
Suggested change
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-XSS-Protection "1; mode=block" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | |
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-Content-Type-Options "nosniff" always; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Related Issue
Changes
Testing
Screenshots (if applicable)
Checklist