### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Reproducible with https://github.com/localstack/localstack-terraform-samples/tree/master/apigatewayv2-http-referer-header

Describe here https://github.com/localstack/localstack/issues/5833

### Expected Behavior

Use of the `Referer` header should be consistent across method resources.

### How are you starting LocalStack?

With a `docker run` command

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker run localstack/localstack

Run the example https://github.com/localstack/localstack-terraform-samples/tree/master/apigatewayv2-http-referer-header


### Environment

```markdown
- OS: 
- LocalStack:
```


### Anything else?

_No response_
return PROXY_LISTENERS.get(api)
def do_forward_request_inmem(api, method, path, data, headers, port=None):
    listener_details = get_handler_for_api(api, headers)
    if not listener_details:
        message = f'Unable to find listener for service "{api}" - please make sure to include it in $SERVICES'
        LOG.warning(message)
        raise HTTPErrorResponse(message, code=400)
    service_name, backend_port, listener = listener_details
    
    client_address = LOCALHOST_IP
    server_address = headers.get("host") or LOCALHOST
    forward_url = f"http://{LOCALHOST}:{backend_port}"
    response = modify_and_forward(
        method=method,
        path=path,
        data_bytes=data,
        headers=headers,
        forward_base_url=forward_url,
        listeners=[listener],
        client_address=client_address,
        server_address=server_address,
    )
    return response
def do_forward_request_network(port, method, path, data, headers, target_url=None):