我无法点击我在nodejs https服务器上创建的API,而它们在http服务器上工作正常。
以下是我将nodejs更改为https
的代码var fs = require('fs');
var https = require('https');
var app = express();
var privateKey = fs.readFileSync('server.key', 'utf8');
var certificate = fs.readFileSync('server.crt', 'utf8');
var credentials = {key: privateKey, cert: certificate};
var httpsServer = https.createServer(credentials, app);
httpsServer.listen(8000);
修改 但当我在终端点击 curl -k -X GET https://myurlandport/profile/id 时,我正在正确回复