I working with firebase functions to send POST requests to a callback uri. I created a webhook to listen for changes on a Trello board list. All I want to do is just print the request body to the callback window. Here’s my code:
const functions = require(‘firebase-functions’);
const cors = require(‘cors’)({origin: ‘*’});
// // Create and Deploy Your First Cloud Functions
// // 시작하기: 첫 번째 함수 작성, 테스트 및 배포 | Cloud Functions for Firebase
//
exports.helloWorld = functions.https.onRequest((request, response) => {
let model = request.body.model;
return cors(request, response, () => {
response.send(request.body);
});
});
When I make change to the list on the Trello, I get {} on the callback and the following warning in the chrome console:
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://appengine.google.com/_ah/loginform?state=~AJKiYcGiiQTv0_WgVQLFN27xpj149zqD6tI-cajpaa837WKtX7S7C8nd-GouoQLyH1h5O11dMUIOspuKxgUG5PoklZp6zoll2KoPDRxgoI1m3ITdAR8yTUKwJ_1e4XrMSF_vyKfT4MzcOtwJpTQuHXFsxEBJOP593XvpNKg54wfqHc708GdAwb7wZFqBUbIjoW4JVqIeU_bIAXVKNKKMwpFDpIzu7Inv9Urtqi-550k-CQcGjLqzZvWWztLjIqecQW5YjHuPmq0HgDdBsqDyrYSClonbFPa7ckMzw5qcm5egByD3C4Z9xjv6vNT4yEkYvJc3wgEoLKuu9YPfQoFWBumEgaklgk-Qcg with MIME type text/html.
Is anyone experiencing the same issue?