36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
# Test config for HLS encryption with query string in hls_key_url
|
|
# This tests the fix for issue #4426
|
|
|
|
listen 1935;
|
|
max_connections 1000;
|
|
daemon off;
|
|
srs_log_tank console;
|
|
|
|
http_server {
|
|
enabled on;
|
|
listen 8080;
|
|
dir ./objs/nginx/html;
|
|
}
|
|
|
|
vhost __defaultVhost__ {
|
|
hls {
|
|
enabled on;
|
|
hls_fragment 10;
|
|
hls_window 60;
|
|
hls_path ./objs/nginx/html;
|
|
hls_m3u8_file [app]/[stream].m3u8;
|
|
hls_ts_file [app]/[stream]-[seq].ts;
|
|
|
|
# Enable AES-128 encryption
|
|
hls_keys on;
|
|
hls_fragments_per_key 5;
|
|
hls_key_file [app]/[stream]-[seq].key;
|
|
hls_key_file_path ./objs/nginx/html;
|
|
|
|
# Test with query string - this should now work correctly
|
|
# Expected result in m3u8: http://localhost:8080/live/livestream-0.key?token=abc123&sig=xyz789
|
|
hls_key_url http://localhost:8080/?token=abc123&sig=xyz789;
|
|
}
|
|
}
|
|
|