我已经实现了一个像这样的简单静态服务器/etc/nginx/sites-available/default
,它将为一堆文件提供服务
server {
listen 80;
server_name www.x.app x.app;
root /usr/share/app/front-end/build;
location / {
index index.html;
autoindex on;
autoindex_exact_size off;
}
}
但是当我浏览http://www.x.app将立即被重定向到https://www.x.app但我想以 http 浏览并且我搜索了很多并找出Non-Authoritative-Reason: HSTS
chrome 获取的标题(这将使用重定向我307 Internal Redirect
)由于“HSTS”而出现安全问题答案说add_header Strict-Transport-Security "max-age=0";
在NginX配置中使用但它不起作用PS1:我清除了我的chrome缓存并且也不起作用PS2:
在 chrome 中查询 HSTS/PKP 域:
Found:
static_sts_domain: app
static_upgrade_mode: FORCE_HTTPS
static_sts_include_subdomains: true
static_sts_observed: 1613773712
static_pkp_domain:
static_pkp_include_subdomains:
static_pkp_observed:
static_spki_hashes:
dynamic_sts_domain:
dynamic_upgrade_mode: UNKNOWN
dynamic_sts_include_subdomains:
dynamic_sts_observed:
dynamic_sts_expiry: