跳到主要内容
CNode
查看回复

回复 (5)

M
MiYogurt#48 年前

前端跳转 =。= window.location.href ,我这样干过,瞬间访问量翻倍。

L
lincenying#38 年前
server {
    listen 80;
    listen 443;
    server_name www.xxxxxx.com;
    ssl on;
    ssl_certificate xxxxxxxxxxxx.crt;
    ssl_certificate_key xxxxxxxxxxxx.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置
    ssl_prefer_server_ciphers on;

    if ($scheme = http) {
        return 301 https://$host$request_uri;
    }

    //............
}
X
xiaozhongliu#29 年前

这跟node没关系, nginx一搞就好

Z
zuohuadong#19 年前

http 需要 监听80端口,然后301跳转到https (https 默认443 端口)

参与回复

登录后即可参与回复。登录