### 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_
elif result[0] == "execute-api" or ".execute-api." in host:
        result = "apigateway", config.service_port("apigateway")
    elif target.startswith("Firehose_"):
        result = "firehose", config.service_port("firehose")
    elif target.startswith("DynamoDB_"):
        result = "dynamodb", config.service_port("dynamodb")
    elif target.startswith("DynamoDBStreams") or host.startswith("streams.dynamodb."):
        
        result = result_before = "dynamodbstreams", config.service_port("dynamodbstreams")
    elif result[0] == "EventBridge" or target.startswith("AWSEvents"):
        result = "events", config.service_port("events")
    elif target.startswith("ResourceGroupsTaggingAPI_"):
        result = "resourcegroupstaggingapi", config.service_port("resourcegroupstaggingapi")
    elif result[0] == "resource-groups":
        result = "resource-groups", config.service_port("resource-groups")
    elif result[0] == "es" and path is not None and not path.startswith("/2015-01-01/"):
        
        
        
        result = "opensearch", config.service_port("opensearch")
    return result[0], result_before[1] or result[1], path, host
def extract_service_name_from_auth_header(headers: Dict) -> Optional[str]:
    try:
        auth_header = headers.get("authorization", "")
        credential_scope = auth_header.split(",")[0].split()[1]
        _, _, _, service, _ = credential_scope.split("/")
        return service
    except Exception:
        return
def is_s3_form_data(data_bytes):