# How to  Access-Control-Allow-Origin to playlist.m3u8 file?

**URL:** <https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846>\
**Category:** Wowza Streaming Engine\
**Created:** [December 19, 2011, 1:37pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846 "2011-12-19T13:37:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 1:37pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/1 "2011-12-19T13:37:03Z")

</div>

I would like to read the playlist file from a domain different to the one that Wowza is running on. I’m currently doing this via a jquery get request to path/to/playlist.m3u8. This works fine when running from a file but when running from localhost I get this:

```auto
XMLHttpRequest cannot load http://slalom.local:1935/timedmetatest/mp4:sample.mp4/playlist.m3u8. 
Origin http://localhost is not allowed by Access-Control-Allow-Origin.

```

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [December 19, 2011, 1:50pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/2 "2011-12-19T13:50:56Z")

</div>

Hi

There is a file called crossdomain.xml and a file called clientaccesspolicy.xml have you made changes in ether of these files?

crossdomain.xml is set to allow all as the default which is why I ask.

clientaccesspolicy.xml is set to allow all as the default as well.

Please check these files as this may not have been the default (to allow all) in the past.

Jason

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [December 19, 2011, 6:46am UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/3 "2011-12-19T06:46:19Z")

</div>

See IHTTPStreamerSession.setUserHTTPHeader

Charlie

---

<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:** [December 19, 2011, 7:05pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/4 "2011-12-19T19:05:33Z")

</div>

HTTP origin stream is a possible (maybe) future feature of Wowza 3, but I don’t have any time frame. At present it is not supported, though not impossible. I’m not sure, but I don’t think your approach of extending Wowza will work, though I am not sure what to suggest, an external approach perhaps.

Richard

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [December 19, 2011, 2:05pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/5 "2011-12-19T14:05:01Z")

</div>

Hi

No that’s correct,

I think if that’s not the case then you must have a policy on the local server which stops you from getting data from outside the local server.

Unfortunately I don’t know where this policy would be for you locally.

Jason

---

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 1:56pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/6 "2011-12-19T13:56:12Z")

</div>

Hi Jason thanks for your reply.

The crossdomain.xml file currently reads:

```auto
<cross-domain-policy>
	<allow-access-from domain="*" />
	<site-control permitted-cross-domain-policies="all"/>
</cross-domain-policy>

```

Is there anything I should add to this?

---

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 2:14pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/7 "2011-12-19T14:14:36Z")

</div>

Hi

Is there a way I can simply do ‘resp.setHeader(“Access-Control-Allow-Origin”, “\*”);’ in the HTTPProvider class responsible for the playlist.m3u8 hosting?

---

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 5:28pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/8 "2011-12-19T17:28:58Z")

</div>

Will do, thanks Charlie

---

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 6:40pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/9 "2011-12-19T18:40:45Z")

</div>

As far I’m aware, IHTTPStreamerSession is passed as an argument to onHTTPSessionCreate. I’m not dealing with sessions; I would just like to be able to access the playlist.m3u8 file. As the error messages are point to Access-Control-Allow-Origin, I have a strong suspicion its a case of setting the header of the HTTPProvider that is responsible for the playlist.m3u8 response output.

Can anyone point me in the right direction as to where or how to obtain the playlist.m3u8 file before it is streamed?

---

<div class="post-metadata">

**Author:** ![Mark\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mark\_Nguyen](https://community.wowza.com/u/Mark_Nguyen)\
**Post date:** [December 19, 2011, 7:18pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/10 "2011-12-19T19:18:58Z")

</div>

We’re using Wowza with Node.js. Node is taking care of the majority of the HTTP requests. The timed metadata is what we’re most interested in and after discovering that getting timed meta of HLS streams is restricted to native iOS apps we’re trying everything possible to work out a way of synchronising live material with html content.

I found this article very helpful: [https://www.wowza.com/docs/how-to-debug-timed-data-events-id3-tags-from-apple-hls-streams-in-ios-devices](https://www.wowza.com/docs/how-to-debug-timed-data-events-id3-tags-from-apple-hls-streams-in-ios-devices)

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Singh](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Ravi\_Kumar\_Singh](https://community.wowza.com/u/Ravi_Kumar_Singh)\
**Post date:** [July 19, 2017, 12:46pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/11 "2017-07-19T12:46:43Z")

</div>

**This is question not the answer**

**@Jason Hilton**

I am having the same issue, where I am not able to play the video on demand in only HLS mode , the RTMP and DASH works fine for me , when I change the protocol to HLS ,it gives me the "Error that is coming is -\> Cannot load M3U8: Crossdomain access denied

version of wowza is - \> Wowza Streaming Engine 4 Perpetual Pro Edition 4.1.1

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [July 19, 2017, 1:01pm UTC](https://community.wowza.com/t/how-to-access-control-allow-origin-to-playlist-m3u8-file/37846/12 "2017-07-19T13:01:00Z")

</div>

Hi,  
This is an old thread and a few things have changed since the original question was posted. We now how [this article](https://www.wowza.com/docs/how-to-enable-cross-origin-resource-sharing-cors-for-http-based-streams) that you can follow, however this requires Wowza Streaming Engine 4.4.0 and above and so I recommend updating to [the latest version](https://www.wowza.com/docs/how-to-update-your-wowza-streaming-engine-installation).

Regards,  
Jason Hilton  
Wowza Media Systems Support Team
