I configure the HLS streaming service through the cloud and implement several security measures to protect the content. I have successfully done this with http, I can broadcast the video and watch it on my website with a lot of protection measures to protect the content. For more information on how I managed to get it to work on http, you can consult him in a post I made to drupal.org about the safe hls stream .
But now I need to add https to the formula, because some encryption keys are transferred for the encrypted hls segments, but I'm having problems. Now I am working on adding https to the formula. I added the certificate to my site and I added another certificate to cludfront because my certificate is not wildcard.
My site certificate works for subdomain.mydomain.com
My cloud certificate is for * .mydomain.com
My cloud distribution has cname cdn.mydomain.com
When I create a cookie, I set the secure parameter to true in the call (6th parameter after the domain):
setcookie($name, $value, strtotime('+1 hour'), "/", ".mydomain.com", true, true);
But when I try to access some test data on my site
if (readfile('https://cdn.mydomain.com/privacy_test.txt')==0) print "Error in cdn access";
I do not see the contents of the file on my website, but an error message.
So it seems to me that I need more things to make a cookie with aws signed clouds under https. Any help?