登录了一下服务器发现本站的接口服务:https://api.zngg.net/ 的ssl证书要到期了,于是决定续签。登录到 https://freessl.cn/ 申请一个免费的ssl证书,我用的是浏览器申请,申请完成以后会有两个证书一个密钥,然后我就随机复制了一个证书和一个密钥,之后访问接口服务没有问题了。
问题:基于Nuxt3的本站无法请求到数据
我直接访问本站,发现nuxt3无法请求到数据,于是猜测和ssl有关系,本地跑一下本站发现打开网站会报错:
Cannot stringify arbitrary non-POJOs FetchError
最终定位问题:ssl证书不能只复制一个,需要两个都复制才可以。
这让我想到一个相关问题:https://www.zngg.net/read/post/982805250408710144