From 779b9604fd0cf44c2d30ff05f52f93970fad6610 Mon Sep 17 00:00:00 2001 From: kalturaguy Date: Thu, 15 Sep 2016 15:37:06 +0300 Subject: [PATCH] add secure link token --- packager/config/nginx.conf.live.bootstrap.template | 2 +- packager/config/nginx.conf.template | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packager/config/nginx.conf.live.bootstrap.template b/packager/config/nginx.conf.live.bootstrap.template index c54ff13a..45b561b7 100644 --- a/packager/config/nginx.conf.live.bootstrap.template +++ b/packager/config/nginx.conf.live.bootstrap.template @@ -11,7 +11,7 @@ if ($playlist = '') { alias @CONTENT_DIR@/$entryId/$playlist; -add_header X-DEBUG-HEADER "entryId=$entryId; token=$token; key=$tokenKey; host=$host"; +add_header X-DEBUG-HEADER "entryId=$entryId; token=$token; key=$scheme://$http_host$tokenKey; host=$host; secure_link=$secure_link"; #if ($secure_link = "") { # return 403 "Incorrect Url provided"; diff --git a/packager/config/nginx.conf.template b/packager/config/nginx.conf.template index 29c90aa1..d50f9813 100644 --- a/packager/config/nginx.conf.template +++ b/packager/config/nginx.conf.template @@ -73,17 +73,17 @@ http { return 200 "Kaltura"; } - location ~ ^/live/(?.*/p/\d+/entryId/(?[^/]+)(/playlist/(?[^/]+))?)(/token/(?[^/]+))?/ { + location ~ ^(?/(scf|s/)?.*/\d+/entryId/(?[^/]+)(/playlist/(?[^/]+))?)(/token/(?[^/]+))?/ { - #secure_link $token; - #secure_link_md5 "KKK $http_host $tokenKey"; + secure_link $token; + secure_link_md5 "test $scheme://$http_host$tokenKey"; - location ~ ^/live/hls/ { + location ~ /live/hls/ { include nginx.conf.live.bootstrap; vod hls; } - location ~ ^/live/enc/hls/ { + location ~ /live/enc/hls/ { include nginx.conf.live.bootstrap; vod hls; vod_secret_key "jKsf!hAuaJak $vod_suburi"; @@ -91,7 +91,7 @@ http { } - location ~ ^/live/hds/ { + location ~ /live/hds/ { include nginx.conf.live.bootstrap; vod hds; }