# CORS issue with security token with wowza cloud to fastly

**URL:** <https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251>\
**Category:** Wowza Video (Formerly Streaming Cloud)\
**Tags:** security\
**Created:** [May 25, 2020, 9:16pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251 "2020-05-25T21:16:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcel\_Fontes2](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Marcel\_Fontes2](https://community.wowza.com/u/Marcel_Fontes2)\
**Post date:** [May 25, 2020, 9:16pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/1 "2020-05-25T21:16:30Z")

</div>

Hi there,

I have a problem with a live stream player, generated with the wowza player builder ( [https://player.wowza.com/builder](https://player.wowza.com/builder) ).  
If I add the withCredentials value, the player fails to load the stream and I´m getting a CORS error:

_Access to XMLHttpRequest at ‘[https://cdn3.wowza.com/1/xxxxxxxx/xxxxxxx/hls/live/playlist.m3u8](https://cdn3.wowza.com/1/xxxxxxxx/xxxxxxx/hls/live/playlist.m3u8)’ from origin ‘[https://player.wowza.com](https://player.wowza.com)’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘\*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute._

This happens in the player preview and with the player on my own domain/webspace.  
I guess, this is an error because it should at least work on the player generator page.

My goal is the secure the player with a security token.

Any hints?

---

<div class="post-metadata">

**Author:** ![Cassidy\_Reilly](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cassidy\_Reilly](https://community.wowza.com/u/Cassidy_Reilly)\
**Post date:** [May 27, 2020, 4:37pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/2 "2020-05-27T16:37:48Z")

</div>

We’re releasing a Cloud/Fastly update later on today @Marcel Fontes and that may resolve this. I’ll be sure to send you the info when it is complete so you can try it out.

---

<div class="post-metadata">

**Author:** ![Cassidy\_Reilly](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cassidy\_Reilly](https://community.wowza.com/u/Cassidy_Reilly)\
**Post date:** [May 27, 2020, 9:43pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/3 "2020-05-27T21:43:56Z")

</div>

I am assuming you’ve already checked this:

-The server might be running over HTTP and serving the stream over HTTP, but the client (player) might be loaded over HTTPS. This would trigger CORS issues.

---

<div class="post-metadata">

**Author:** ![Marcel\_Fontes2](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Marcel\_Fontes2](https://community.wowza.com/u/Marcel_Fontes2)\
**Post date:** [June 11, 2020, 7:11am UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/4 "2020-06-11T07:11:28Z")

</div>

Issue solved, thanks.

---

<div class="post-metadata">

**Author:** ![Marcel\_Fontes2](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Marcel\_Fontes2](https://community.wowza.com/u/Marcel_Fontes2)\
**Post date:** [July 7, 2020, 7:32pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/5 "2020-07-07T19:32:35Z")

</div>

Here is a manual: [https://www.wowza.com/docs/protect-a-wowza-cdn-on-fastly-stream-target-with-token-authentication-using-the-wowza-streaming-cloud-rest-api](https://www.wowza.com/docs/protect-a-wowza-cdn-on-fastly-stream-target-with-token-authentication-using-the-wowza-streaming-cloud-rest-api)

I used the example code on Github: [https://github.com/WowzaMediaSystems/wsc-fastly-token-auth-examples](https://github.com/WowzaMediaSystems/wsc-fastly-token-auth-examples)

Please be aware that “protect by IP” does not work in some cases because the user could have a dual stack IP.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [July 7, 2020, 8:07pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/6 "2020-07-07T20:07:27Z")

</div>

Thank you Marcel!!

---

<div class="post-metadata">

**Author:** ![IRFAN\_SAQLAIN](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@IRFAN\_SAQLAIN](https://community.wowza.com/u/IRFAN_SAQLAIN)\
**Post date:** [July 7, 2020, 6:24pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/7 "2020-07-07T18:24:36Z")

</div>

please tell me @Marcel Fontes you are true blood please help me how can i protect my stream like this…

My goal is the secure the player with a security token.

Any hints? please help Marcel Bro…

---

<div class="post-metadata">

**Author:** ![Marcel\_Fontes2](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Marcel\_Fontes2](https://community.wowza.com/u/Marcel_Fontes2)\
**Post date:** [July 7, 2020, 7:32pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/8 "2020-07-07T19:32:35Z")

</div>

Here is a manual: [https://www.wowza.com/docs/protect-a-wowza-cdn-on-fastly-stream-target-with-token-authentication-using-the-wowza-streaming-cloud-rest-api](https://www.wowza.com/docs/protect-a-wowza-cdn-on-fastly-stream-target-with-token-authentication-using-the-wowza-streaming-cloud-rest-api)

I used the example code on Github: [https://github.com/WowzaMediaSystems/wsc-fastly-token-auth-examples](https://github.com/WowzaMediaSystems/wsc-fastly-token-auth-examples)

Please be aware that “protect by IP” does not work in some cases because the user could have a dual stack IP.

---

<div class="post-metadata">

**Author:** ![IRFAN\_SAQLAIN](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@IRFAN\_SAQLAIN](https://community.wowza.com/u/IRFAN_SAQLAIN)\
**Post date:** [July 9, 2020, 3:11pm UTC](https://community.wowza.com/t/cors-issue-with-security-token-with-wowza-cloud-to-fastly/55251/9 "2020-07-09T15:11:29Z")

</div>

okay Thank U So Much and Please Guide me how to use Security key with my stream id … where can i putt security Token Authentication Key…

```auto
https://cdn3.wowza.com/1/Q0NsQmxKQm5XTU80/Y0c0REIx/hls/live/playlist.m3u8

```
