### 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_
&X-Amz-Algorithm=AWS4-HMAC-SHA256\
       &X-Amz-Credential=test%2F20210313%2Fus-east-1%2Fsqs%2Faws4_request\
       &X-Amz-Date=20210313T011059Z&X-Amz-Expires=86400000&X-Amz-SignedHeaders=host\
       &X-Amz-Signature=2c652c7bc9a3b75579db3d987d1e6dd056f0ac776c1e1d4ec91e2ce84e5ad3ae
    """
    if auth_header := headers.get("authorization", ""):
        return auth_header
    data_components = parse_request_data(method, path, data)
    algorithm = data_components.get("X-Amz-Algorithm")
    credential = data_components.get("X-Amz-Credential")
    signature = data_components.get("X-Amz-Signature")
    signed_headers = data_components.get("X-Amz-SignedHeaders")
    if algorithm and credential and signature and signed_headers:
        return (
            f"{algorithm} Credential={credential}, "
            + f"SignedHeaders={signed_headers}, "
            + f"Signature={signature}"
        )
    return ""
def get_api_from_headers(headers, method=None, path=None, data=None):
    """Determine API and backend port based on "Authorization" or "Host" headers."""
    
    result = API_UNKNOWN, 0
    target = headers.get("x-amz-target", "")
    host = headers.get("host", "")
    auth_header = headers.get("authorization", "")
    if not auth_header and not target and "." not in host:
        return result[0], result[1], path, host
    path = path or "/"