Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于http和https问题 #35

Open
Heartworm97 opened this issue Nov 23, 2024 · 2 comments
Open

关于http和https问题 #35

Heartworm97 opened this issue Nov 23, 2024 · 2 comments

Comments

@Heartworm97
Copy link

大佬,搭建好以后,本地访问没问题,拉到服务器
搭建以后启动项目,地址显示的是http。并不是https,关于这个问题我该如何解决呢。
微信截图_20241123114339

@mjsoftking
Copy link

server {
   listen       8099;
   server_name  localhost;

   location /meting/ {
      proxy_pass http://localhost:3000/;
      proxy_set_header X-Forwarded-Host $scheme://$host:$server_port/meting;
   }
}

重点是这个 proxy_set_header X-Forwarded-Host $scheme://$host:$server_port/meting; $scheme 直接改成https
proxy_set_header X-Forwarded-Host https://$host:$server_port/meting;

@mjsoftking
Copy link

我就是这么改的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants