Closed wabshs closed 1 year ago
前端就不认后端的http请求了
不知道具体是什么意思,可以把报错贴出来。
宝塔的配置我不太了解,如果有nginx配置,我可以帮忙看一下。
大佬这是报错信息:
was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://我的公网IP:8090/blogs'. This request has been blocked; the content must be served over HTTPS.
就是部署了SSL之后后台请求还是https,我想着如何用nginx代理让后台的http变成https,但是搜了很多没有效果
server
{
listen 80;
listen 443 ssl http2;
server_name 我的域名;
index index.php index.html index.htm default.php default.htm default.html;
try_files $uri $uri/ /index.html #防止刷新404;
root /www/wwwroot/http;
}
麻烦大佬了
看起来像是nginx的配置问题,可以参考下https://github.com/Naccl/NBlog/issues/63
好的大佬,多谢 解决了! 努力向您学习 技术太好了
我是后端也给了ssl证书 然后后端的那个请求体写你的域名:端口号 不要写IP地址
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年5月11日(星期四) 下午2:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Naccl/NBlog] 大佬想问下关于ssl证书的问题 (Issue #106)
@NanamiMashiro 请问一下是如何解决的 我也遇到该问题 前端ssl都配置好了 但是连接后端就报错
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
大佬我给域名申请了ssl证书 宝塔部署了之后前端就不认后端的http请求了,想问一下nginx如何解决这个问题