I am trying to build an application that executes logic ONLY if the origin URL is on allowlist. I am trying to get the origin URL inside of a Firebase Function using the following methods:

I tried using these from [this stack overflow post](https://stackoverflow.com/questions/64469672/get-request-url-in-firebase-cloud-function):

```
req.get('Referrer')
req.get('Referer')
req.headers.referer
req.headers.referrer

```

All return undefined.

I tried to to put together this function from [this stack overflow post](https://stackoverflow.com/questions/10183291/how-to-get-the-full-url-in-express):

```
function getOriginUrl(req: any) {
    return req.protocol + '://' + req.get('host') + req.originalUrl
}

```

This returns the base url of my cloud functions

```
https://us-central1-secured-1q4fq.cloudfunctions.net/

```

What I would actually like to see is the url that the post was made from. I am using [this](https://reqbin.com) to make the post so I expect to see:

```
 https://reqbin.com

```