I'm not sure if you would like to replace or not existing headers (made by the HeaderBag::set method).
If yes, then the code will look like :

````
            $response->headers->set(
                'Content-Type',
                $contentTypeHeaders,
                true
            );

```