@warren-bank/hls-proxy 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -286,7 +286,7 @@ const finalize_embedded_url = function(embedded_url, vod_start_at_ms, debug) {
286
286
  embedded_url.unencoded_url = ''
287
287
  }
288
288
  else {
289
- const url = embedded_url.redirected_url || embedded_url.resolved_match_url
289
+ let url = embedded_url.redirected_url || embedded_url.resolved_match_url
290
290
 
291
291
  if (embedded_url.url_type)
292
292
  debug(3, 'url type:', embedded_url.url_type)
@@ -1,7 +1,7 @@
1
1
  const parse_url = require('@warren-bank/url').parse
2
2
 
3
3
  const regexs = {
4
- req_url: new RegExp('^(.*)/([^\\._/\\?#]+)(?:[\\._]([^/\\?#]*))?(?:[\\?#].*)?$', 'i'),
4
+ req_url: new RegExp('^(.*?)/([a-zA-Z0-9\\+/=%]+)(?:[\\._]([^/\\?#]*))?(?:[\\?#].*)?$'),
5
5
  origin: new RegExp('^(https?://[^/]+)(?:/.*)?$', 'i')
6
6
  }
7
7
 
@@ -30,7 +30,7 @@ const parse_req_url = function(params, req) {
30
30
 
31
31
  let url, url_lc, index
32
32
 
33
- url = base64_decode( matches[2] ).trim()
33
+ url = base64_decode( decodeURIComponent( matches[2] ) ).trim()
34
34
  url_lc = url.toLowerCase()
35
35
  index = url_lc.indexOf('http')
36
36
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warren-bank/hls-proxy",
3
3
  "description": "Node.js server to proxy HLS video streams",
4
- "version": "3.2.0",
4
+ "version": "3.2.2",
5
5
  "scripts": {
6
6
  "start": "node hls-proxy/bin/hlsd.js",
7
7
  "sudo": "sudo node hls-proxy/bin/hlsd.js"