# Add custom request headers while chrome casting

**URL:** <https://community.bitmovin.com/t/add-custom-request-headers-while-chrome-casting/2186>\
**Category:** Support\
**Tags:** bitmovin-player, drm, bitmovin, web, chromecast\
**Created:** [August 2, 2023, 12:58pm UTC](https://community.bitmovin.com/t/add-custom-request-headers-while-chrome-casting/2186 "2023-08-02T12:58:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhuy1729](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@madhuy1729](https://community.bitmovin.com/u/madhuy1729)\
**Post date:** [August 2, 2023, 12:58pm UTC](https://community.bitmovin.com/t/add-custom-request-headers-while-chrome-casting/2186/1 "2023-08-02T12:58:48Z")

</div>

how can i add custom request headers to stream url while casting.

> [@I need to include the sessionid and token in the stream URL request headers. How can I add custom request headers using the web SDK?](https://community.bitmovin.com/t/i-need-to-include-the-sessionid-and-token-in-the-stream-url-request-headers-how-can-i-add-custom-request-headers-using-the-web-sdk/2161):
>
> If you have any insights or suggestions, I would greatly appreciate your input. Thank you so much in advance for your time and support.

with the help of @Kishore i have solved adding custom request headers to manifest url. but while chrome casting it is not working. how can i add custom request headers to stream url while casting.

---

<div class="post-metadata">

**Author:** ![lucky.goyal](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lucky.goyal/32/506_2.png) [@lucky.goyal](https://community.bitmovin.com/u/lucky.goyal)\
**Post date:** [August 4, 2023, 9:46am UTC](https://community.bitmovin.com/t/add-custom-request-headers-while-chrome-casting/2186/2 "2023-08-04T09:46:29Z")

</div>

Hi @madhuy1729 , thanks for reaching out to Bitmovin community. The custom headers configured in DrmConfig (for DRM requests) are passed to CAF receiver as `loadRequestData.media.customData.drm`. Please see Bitmovin reference [CAF receiver code](https://github.com/bitmovin/bitmovin-player-caf-receiver/blob/main/src/index.ts#L35-L37) on how to use this.

On similar lines if you need to pass custom HTTP headers for other network requests like playlists and segments, then you can send this along with LOAD request as custom metadata values as shared in [Send custom metadata on a custom Chromecast receiver](https://community.bitmovin.com/t/send-custom-metadata-on-a-custom-chromecast-receiver/2172) and then can use this in a custom CAF receiver for the respective network request. An example of this for DRM request is present in [Bitmovin reference CAF receiver](https://github.com/bitmovin/bitmovin-player-caf-receiver/blob/main/src/index.ts#L47-L51).

Similar concept can be used for Manifest requests using [cast.framework.PlaybackConfig. manifestRequestHandler](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.PlaybackConfig#manifestRequestHandler) or for segment requests using [cast.framework.PlaybackConfig. SegmentRequestHandler](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.PlaybackConfig#segmentRequestHandler)

Do let us know if above information helps address your use case and if there are any followup questions.
