chat2api求救SOS


之前一直是uuid报错,佬们告诉我是http的原因,折腾了半天终于为小鸡整上了https,但是现在访问就出现这种问题,一片空白,这已经是在/login界面输入token后跳转的了,实在不知道怎么回事了,是nginx配置的问题吗

7 个赞
nginx
server {
    listen 80;
    server_name xxx.xxx;

    # HTTPS 重定向 (可选,但强烈推荐)
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name xxx.xxx;

    ssl_certificate /path;
    ssl_certificate_key /path;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';


    access_log /var/log/nginx/chat2api.access.log;
    error_log /var/log/nginx/chat2api.error.log;

    location / {
        proxy_pass http://chat2api;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # WebSocket 支持 (如果 chat2api 使用 WebSocket)
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

    }


    # 静态资源服务 (如果需要)
    location /static/ {
        alias /path/to/your/chat2api/static/;  # 静态资源目录的实际路径
        expires 30d; # 缓存静态资源 30 天
    }


    # 针对一些特定 API 端点的配置 (根据 chat2api 的实际情况调整)
    # 例如,上传 API 可能需要更大的 client_max_body_size
    # location /api/upload {
    #     client_max_body_size 10M; # 允许上传最大 10MB 的文件
    #     proxy_pass http://chat2api;
    #     proxy_set_header Host $host;
    #     proxy_set_header X-Real-IP $remote_addr;
    #     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # }

}

这是我的nginx,可以参考一下

7 个赞

建议你f12看一下是哪里报错了,这像连不上gpt

6 个赞

太感谢了,我再试试

6 个赞

image
好像是这个原因

5 个赞

image
配置后我按f12发现这个错误,佬知道咋解决吗

2 个赞

不知道,看不懂 :tieba_087:

1 个赞

这只是icon加载的问题吧,你看看网络里打开报错

1 个赞

你nginx有设置成这样吗 我也出现你这个情况改成这样就行了 :joy:
proxy_pass http://127.0.0.1:5005/;

1 个赞

image
有个这个问题

5005后面加个/吗?

你的rt或者at保证是有效的吧?而且正确录入了?

有效的,用别的镜像站验证过

佬能看看你的nginx配置文件吗 :pleading_face:

现在发现在chrome上可以用,到了edge就不行了

是不是edge没清理缓存?开无痕试试

还真是我靠

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。