add http headers for apple HLS m3u8 file and ts file

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?

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

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

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

Richard

Add this to Application.xml /HTTPStreamer Properties container:

<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

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

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

Richard

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?

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.