I use Node.js of Cloud Function. This is part of my program.
const postDevice = (user, device) => {
const options = {
host: user.host, //URL
port: device.port, //PORT
method: 'POST',
ContentType: 'text/plain',
//ヘッダーに指示内容をセット
headers: {
email: '[email protected]',
device: 'TV',
action: 'ON',
},
};
const req = http.request(options, (res) => {
res.setEncoding('utf8');
res.on('data', (chunk) => {
console.log('BODY:', chunk);
});
res.on('end', () => {});
});
req.end();
};
I want to know the FQDN of the sender when I send a POST from Cloud Functions.
I tried to verify the FQDN from the device receiving the POST request but could not.
Also posted on: https://groups.google.com/g/firebase-talk/c/pARy7cXJ2Q8
Posting this as a community wiki so that others can benefit from it.
As mentioned by @John Hanley:
You may check this link for Compute Engine | Internal DNS.