mirror of
https://github.com/electerm/electerm-web.git
synced 2026-04-25 05:45:55 +03:00
[GH-ISSUE #24] 希望能支持ssl #20
Labels
No labels
bug
feature
need investigate
need investigate
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/electerm-web#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wolfcdd on GitHub (Jun 24, 2025).
Original GitHub issue: https://github.com/electerm/electerm-web/issues/24
What feature you'd like to see or proposal(期望什么新功能/特性或者建议)
希望能直至https,现在只能http访问,使用https会出现如下报错:
Mixed Content: The page at 'https://abc.xxx.com:7072/' was loaded over HTTPS, but requested an insecure stylesheet 'http://10.3.5.77:7072/css/2.91.17-basic.css'. This request has been blocked; the content must be served over HTTPS.
即使在nginx反向代理中增加升级请求的参数也不生效
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
add_header Content-Security-Policy upgrade-insecure-requests;#自动升级请求,加载 http 资源时自动替换成 https 请求
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@zxdong262 commented on GitHub (Jun 24, 2025):
运行时候.env里不要设置HOST试试
@wolfcdd commented on GitHub (Jun 24, 2025):
@zxdong262 env不设置HOST,就完全无法访问。。。
@zxdong262 commented on GitHub (Jun 24, 2025):
确定是可以的,前几天在vps部署过,不过我是用443端口,这样可以直接访问https://xxxx.xxx,没有端口号,用certbot申请的证书
@wolfcdd commented on GitHub (Jun 25, 2025):
@zxdong262 我使用的是docker版本,我是通过compose创建的,不知道是不是docker版本有特殊的设置,如果我不指定HOST,在LAN中无法访问服务,如果我指定了HOST为0.0.0.0,在LAN里可以正常访问。我也试过把SERVER设置为https,一样不行。
compose如下:
@zxdong262 commented on GitHub (Jun 25, 2025):
抱歉我说错了,不要设置SERVER试试
@wolfcdd commented on GitHub (Jun 26, 2025):
@zxdong262 OK 已解决,希望能支持MFA,这样在外网会更加安全。