CORS Header / SSL

So we had our player successfully working for a short period of time. But we’ve added our own SSL certificate (where as before we were testing with stream lock). The SSL certificate side of things seems to be fully working (the site is secured, the streaming server shows a valid certificate too. I can stream the URL no issue in my browser, But once using our player (theoplayer) we’re getting CORS issues now / again. We had them in the past but seemingly had fixed it. But now its back with a new issue.

[Error] Origin https://SITEURL.tld is not allowed by Access-Control-Allow-Origin.
[Error] Fetch API cannot load https://WOWZASERVER.siteurl.tld/live/smil:PlayList.smil/playlist.m3u8/theoplayer.p.js due to access control checks.
[Error] Failed to load resource: Origin https://SITEURL.tld is not allowed by Access-Control-Allow-Origin. (theoplayer.p.js, line 0)
[Error] Origin https://SiteURL.tld is not allowed by Access-Control-Allow-Origin.
[Error] Fetch API cannot load https://WOWZASERVER.siteurl.tldlive/smil:PlayList.smil/playlist.m3u8/theoplayer.e.js due to access control checks.
[Error] Failed to load resource: Origin https://SITEURL.tld is not allowed by Access-Control-Allow-Origin. (theoplayer.e.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (iframe.html, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (iframe.html, line 0)

Is there something I need to do differently once we setup our own SSL cert for CORS? As again it was working but no longer does

Players do sometimes - incorrectly - report CORS errors when the response is actually a HTTP 404 (Not Found). I’m not sure why you’re using this “theoplayer.p.js” and “theoplayer.e.js” at the end of the URL - did you read that somewhere? Presumably that causes the error.

You can test your URL eg. with curl, and see what result it produces.

curl -vsH "Origin: https://example.com" https://WOWZASERVER.siteurl.tld/live/smil:PlayList.smil/playlist.m3u8/theoplayer.p.js

Try to use the following URL in the player:

https://WOWZASERVER.siteurl.tld/live/smil:PlayList.smil/playlist.m3u8

PS: The JavaScript files that you’re using are apparently for self-hosting THEOplayer (it’s recommended to use cloud-hosted instead)