微信小程序连接后台的时候报错?
发布于 7 年前 作者 maping 1495 次浏览 来自 官方Issues
VM14:2 (in promise) MiniProgramError
{"errMsg":"request:fail -113:net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH"}
Object

但是本地测试和postman连接都没问题,只有在调试和测试的时候没法获取数据,后台用的是nginx转发+springboot.求大佬帮忙看一下具体是哪里的问题,报错好像是ssl证书的问题.

附上nginx的配置

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        \logs\nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs\access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
server {
    listen 80 default_server;
    listen [::]:80 default_server;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ****************; 
    ssl_certificate ../*****.cer;
    ssl_certificate_key ../*****.key;
    ssl_session_timeout 1d;
    ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    # modern configuration
    ssl_protocols TLSv1.3;
    ssl_prefer_server_ciphers off;

    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;

    # OCSP stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    location / {
    proxy_pass http://*********:8080;   
}

    # replace with the IP address of your resolver
    resolver 127.0.0.1;
}

}
回到顶部