Skip to content

Commit

Permalink
add secure link token
Browse files Browse the repository at this point in the history
  • Loading branch information
kalturaguy committed Sep 15, 2016
1 parent a2ca22b commit 779b960
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packager/config/nginx.conf.live.bootstrap.template
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
12 changes: 6 additions & 6 deletions packager/config/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,25 @@ http {
return 200 "Kaltura";
}

location ~ ^/live/(?<tokenKey>.*/p/\d+/entryId/(?<entryId>[^/]+)(/playlist/(?<playlist>[^/]+))?)(/token/(?<token>[^/]+))?/ {
location ~ ^(?<tokenKey>/(scf|s/)?.*/\d+/entryId/(?<entryId>[^/]+)(/playlist/(?<playlist>[^/]+))?)(/token/(?<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";
vod_hls_encryption_method aes-128;
}


location ~ ^/live/hds/ {
location ~ /live/hds/ {
include nginx.conf.live.bootstrap;
vod hds;
}
Expand Down

0 comments on commit 779b960

Please sign in to comment.