Firebase Callable Function + CORS

后端 未结 9 1246
Happy的楠姐
Happy的楠姐 2020-12-15 04:52

I\'m trying to call a callable Cloud Function from my app, but I\'m facing CORS issues.

I can\'t enable Cors since I don\'t have access to the request and response

9条回答
  •  轮回少年
    2020-12-15 05:27

    My issue was not with CORS, but with my error handler. Instead of rejecting the promise, I've used throw directly in the catch handler.

    catch((err) => {
      throw new functions.https.HttpsError('unknown', err.message, err)
    })
    

提交回复
热议问题