### 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`
LOG.warning(
                    'Lambda output should follow the next JSON format: { "isBase64Encoded": true|false, "statusCode": httpStatusCode, "headers": { "headerName": "headerValue", ... },"body": "..."}'
                )
                response.status_code = 502
                response.headers.update({"content-type": "application/json"})
                response._content = json.dumps({"message": "Internal server error"})
                return response
            response.status_code = int(parsed_result.get("statusCode", 200))
            parsed_headers = parsed_result.get("headers", {})
            if parsed_headers is not None:
                response.headers.update(parsed_headers)
            try:
                result_body = parsed_result.get("body")
                if isinstance(result_body, dict):
                    response._content = json.dumps(result_body)
                else:
                    body_bytes = to_bytes(to_str(result_body or ""))
                    if parsed_result.get("isBase64Encoded", False):
                        body_bytes = base64.b64decode(body_bytes)
                    response._content = body_bytes
            except Exception as e:
                LOG.warning("Couldn't set Lambda response content: %s", e)
                response._content = "{}"
            response.multi_value_headers = parsed_result.get("multiValueHeaders") or {}
        
        self.update_content_length(response)
        invocation_context.response = response
        self.response_templates.render(invocation_context)
        return invocation_context.response
class MockIntegration(BackendIntegration):