Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.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云功能位置设置 我想请求一个只允许IP来自香港的API,因此我使用了一个检查。即使我在文档页面()中设置了functions.region('asia-east2'),控制台也会记录检测到的位置是我们 exports.locationFunction = functions.region('asia-east2').pubsub.schedule('every 1 minutes').onRun((context) => { request('https://ifconfig.co/country-iso', function (error, response, body) { console.log("RESULTbody:" + body) }); return admin.database().ref("mylocation").set("detection finished"); });_Firebase_Google Cloud Functions - Fatal编程技术网

Firebase云功能位置设置 我想请求一个只允许IP来自香港的API,因此我使用了一个检查。即使我在文档页面()中设置了functions.region('asia-east2'),控制台也会记录检测到的位置是我们 exports.locationFunction = functions.region('asia-east2').pubsub.schedule('every 1 minutes').onRun((context) => { request('https://ifconfig.co/country-iso', function (error, response, body) { console.log("RESULTbody:" + body) }); return admin.database().ref("mylocation").set("detection finished"); });

Firebase云功能位置设置 我想请求一个只允许IP来自香港的API,因此我使用了一个检查。即使我在文档页面()中设置了functions.region('asia-east2'),控制台也会记录检测到的位置是我们 exports.locationFunction = functions.region('asia-east2').pubsub.schedule('every 1 minutes').onRun((context) => { request('https://ifconfig.co/country-iso', function (error, response, body) { console.log("RESULTbody:" + body) }); return admin.database().ref("mylocation").set("detection finished"); });,firebase,google-cloud-functions,Firebase,Google Cloud Functions,如果您使用的是计划功能,那么您有一台应用程序引擎机器,这是云调度器工作所必需的。我认为默认项目区域可能设置为您想要的“asia-east2”之外的其他内容 如果该功能正确设置为asia-east2,那么唯一可以影响的其他区域配置是应用程序引擎机器启动的默认项目区域,我认为这可能是您的问题 您有更多关于预定功能的信息,以及我提到的关于App Engine机器的信息 您可以看到有关默认项目位置的更多信息 让我知道。我已经测试过创建一个基于asia-east2的新项目。结果仍然是我们

如果您使用的是计划功能,那么您有一台应用程序引擎机器,这是云调度器工作所必需的。我认为默认项目区域可能设置为您想要的“asia-east2”之外的其他内容

如果该功能正确设置为asia-east2,那么唯一可以影响的其他区域配置是应用程序引擎机器启动的默认项目区域,我认为这可能是您的问题

您有更多关于预定功能的信息,以及我提到的关于App Engine机器的信息

您可以看到有关默认项目位置的更多信息


让我知道。

我已经测试过创建一个基于asia-east2的新项目。结果仍然是我们