根据文档,我们可以添加 appcheck,如下所示,
exports.yourCallableFunction = functions.https.onCall((data, context) => {
// context.app will be undefined if the request doesn't include a valid
// App Check token.
if (context.app == undefined) {
throw new functions.https.HttpsError(
'failed-precondition',
'The function must be called from an App Check verified app.')
}
});Run Code Online (Sandbox Code Playgroud)
我现在的问题是如何为以下场景添加应用程序检查?
exports.date = functions.https.onRequest((req, res) => {
});
Run Code Online (Sandbox Code Playgroud)