'How to get the url from the request on the cloud function?
I just can't find this simple thing.
exports.contentServer = functions.https.onRequest((request, response) =>
I am getting ipn from PayPal (POST), and i have to confirm that its actually comes from PayPal.
I am trying to get the url from the request but i can't. I only get the path:
request.url
request.path
both only show me the path which is /paid.
I have to confirm it is actually a PayPal URL with this path.
How to check the url ?
if(request.path === "paid" && url base is paypal)
Solution 1:[1]
You can try:
exports.helloWorld = functions.https.onRequest((req, res) => {
var fullUrl = req.protocol + '://' + req.get('Origin') + req.originalUrl;
res.status(200).send(fullUrl);
});
Please check this related question: link.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | partyblanket |
