### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I Created an REST APIGatway with lambda handler using AWS CDK. when I hit the API the response header content type is always  set to "text/html"  instead of `application/json` . even if I changed the response template or added the header to lambda returned response. when I deploy the same stack on AWS account  the response header is fine and work as expected

### Expected Behavior

Response Header content-type to be `application/json`

### How are you starting LocalStack?

  `localstack start` command

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command`)

    `localstack start` command

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

I'm using AWS CDK typescript application and deploy it using `cdklocal` command on localstack

Using CDK follow the steps:
- create  REST ApiGateway
- create Lambda function 
- integrate lambda with APIGatway

On Command line:
- deploy using `cdklocal deploy` command

Finally
- test the endpoint and check the response header content-type




### Environment

```markdown
- OS: Windows 
- LocalStack: latest
```


### Anything else?

When I deploy the same stack on AWS account everything works fine and the response header content-type is `application/json`
if not is_api_key_required:
        return True
    api_key = headers.get("X-API-Key")
    if not api_key:
        return False
    return validate_api_key(api_key, stage)
def update_content_length(response: Response):
    if response and response.content is not None:
        response.headers["Content-Length"] = str(len(response.content))
def apply_request_parameters(
    uri: str, integration: Dict[str, Any], path_params: Dict[str, str], query_params: Dict[str, str]
):
    request_parameters = integration.get("requestParameters")
    uri = uri or integration.get("uri") or integration.get("integrationUri") or ""
    if request_parameters:
        for key in path_params:
            
            request_param_key = f"integration.request.path.{key}"
            request_param_value = f"method.request.path.{key}"
            if request_parameters.get(request_param_key) == request_param_value:
                uri = uri.replace(f"{{{key}}}", path_params[key])
    if integration.get("type") != "HTTP_PROXY" and request_parameters:
        for key in query_params.copy():
            request_query_key = f"integration.request.querystring.{key}"
            request_param_val = f"method.request.querystring.{key}"
            if request_parameters.get(request_query_key, None) != request_param_val:
                query_params.pop(key)
    return add_query_params_to_url(uri, query_params)
def apply_response_parameters(invocation_context: ApiInvocationContext):