### 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_
api = headers.get(HEADER_TARGET_API) or ""
        if is_trace_logging_enabled(headers):
            
            if api and api != API_UNKNOWN:
                LOG.debug(
                    'OUT(%s): "%s %s" - status: %s - response headers: %s - response: %s',
                    api,
                    method,
                    path,
                    response.status_code,
                    dict(response.headers),
                    response.content,
                )
        if (
            response._content
            and headers.get("Accept-Encoding") == "gzip"
            and api not in SKIP_GZIP_APIS
            and not response.headers.pop(HEADER_SKIP_RESPONSE_ZIPPING, None)
        ):
            
            response._content = gzip.compress(to_bytes(response._content))
            response.headers["Content-Length"] = str(len(response._content))
            response.headers["Content-Encoding"] = "gzip"
    def _require_service(self, api):