Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase云功能使用http协议而不是https_Firebase_Express_Google Cloud Functions - Fatal编程技术网

Firebase云功能使用http协议而不是https

Firebase云功能使用http协议而不是https,firebase,express,google-cloud-functions,Firebase,Express,Google Cloud Functions,我的云功能: const functions = require('firebase-functions'); exports.test = functions.https.onRequest((req, res) => { console.log('req protocol: ' + req.protocol + ', secure: ' + req.secure); res.send('test'); }); 当我部署它时,我会得到一个URL链接来触发它,如下所示:

我的云功能:

const functions = require('firebase-functions');

exports.test = functions.https.onRequest((req, res) => {
    console.log('req protocol: ' + req.protocol + ', secure: ' + req.secure);
    res.send('test');
});
当我部署它时,我会得到一个URL链接来触发它,如下所示:

https://{...}.cloudfunctions.net/test
我在浏览器中打开此链接,即触发该功能,并在Firebase控制台日志中看到:

请您向我解释一下,为什么请求的协议不是“https”


p、 这让我很困惑,因为我需要从客户端发送带有敏感信息的http请求,我想使用
https
协议来实现这一点

如果我在浏览器中签入,电话就会安全地发出。我的猜测是,流量在被传递到您的云函数代码之前,会在谷歌基础设施的某个地方被解密。@Frank van Puffelen:谢谢,我想我现在安全了。