# add http headers for apple HLS m3u8 file and ts file

**URL:** <https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585>\
**Category:** Wowza Streaming Engine\
**Created:** [November 13, 2013, 7:48pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585 "2013-11-13T19:48:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joh\_sun](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joh\_sun](https://community.wowza.com/u/joh_sun)\
**Post date:** [November 13, 2013, 7:48pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/1 "2013-11-13T19:48:50Z")

</div>

Hi,

I want add custom http headers for HLS streaming not cupertinoCacheControlPlaylist and cupertinoCacheControlMediaChunk, and I know I could use cupertinoUserHTTPHeaders in wowza 3.6.2.

When I add one property in Application.xml, it would affect both m3u8 response and ts response, but I only want to add this http header to the m3u8 response.

Would you please give me some advise?

---

<div class="post-metadata">

**Author:** ![Gustavo\_Villegas](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Gustavo\_Villegas](https://community.wowza.com/u/Gustavo_Villegas)\
**Post date:** [November 13, 2013, 12:12pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/2 "2013-11-13T12:12:27Z")

</div>

What header are you trying to add? … I think you’ll have to build a custom module for modifying headers in a non-built-in way

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 13, 2013, 5:32pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/3 "2013-11-13T17:32:21Z")

</div>

There is a way to add arbitrary headers for cupertino and smooth by adding cupertinoUserHTTPHeaders or smoothUserHTTPHeaders to the Application.xml /HTTPStreamer/Properties container. Use pipe separated name value pairs that are : separated:

name1:value1|name2:value2

```auto
<Property>
	<Name>cupertinoUserHTTPHeaders</Name>
	<Value>Access-Control-Allow-Origin: *</Value>
</Property>

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 14, 2013, 2:20pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/4 "2013-11-14T14:20:25Z")

</div>

Add this to Application.xml /HTTPStreamer Properties container:

```auto
<Property>
	<Name>cupertinoUserHTTPHeaders</Name>
	<Value>x-maxusage:1</Value>
</Property>

```

Note that there is an /HTTPStreamers block where packetizers are set, but you want to add this further down in the /HTTPStream Properties

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 15, 2013, 1:32pm UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/5 "2013-11-15T13:32:14Z")

</div>

It is in the http header of the playlist.m3u8 url. You can check with curl

```auto
curl --head http://[wowza-address]:1935/[app-name]/[stream-name]/playlist.m3u8

```

Richard

---

<div class="post-metadata">

**Author:** ![joh\_sun](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joh\_sun](https://community.wowza.com/u/joh_sun)\
**Post date:** [November 14, 2013, 10:27am UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/6 "2013-11-14T10:27:41Z")

</div>

Hi rrlanham and tavius ,

I want to add s-maxage header in chunklist.m3u8 response, the value for chunklist.m3u8 is 1 second, and I don’t want it affect the ts response.

**build a custom module for modifying headers in a non-built-in way**

How Can I do that, inheriting the HTTPStreamerAdapterCupertinoStreamer and HTTPStreamerApplicationContextCupertinoStreamer?

---

<div class="post-metadata">

**Author:** ![joh\_sun](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@joh\_sun](https://community.wowza.com/u/joh_sun)\
**Post date:** [November 15, 2013, 10:59am UTC](https://community.wowza.com/t/add-http-headers-for-apple-hls-m3u8-file-and-ts-file/41585/7 "2013-11-15T10:59:53Z")

</div>

Hi Richard,

Add this:

cupertinoUserHTTPHeaders

x-maxusage:1

would affect both m3u8 response and ts response, but I don’t want the ts response has this header.
