You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Univision is looking to remove some json keys from the body if certain properties.
Here is the javascript code they currently use to remove it
varcontent=context.getVariable("request.content")if(content!==''){if(JSON.parse(content).hasOwnProperty('video')){varpayload=JSON.parse(content)video=payload['video'];if(video.hasOwnProperty('mediaId')){varmediaid=payload['video']['mediaId']+"";if(mediaid.match(/^transmission:matchid:.*/)){payload['video']['mediaId']="video:mcp:unexpected-live-match";context.setVariable('request.content',JSON.stringify(payload));}}if(video.hasOwnProperty('seriesMediaId')){varseriesmediaid=payload['video']['seriesMediaId'];if(seriesmediaid===""){deletepayload['video']['seriesMediaId'];if(video.hasOwnProperty('nextEpisodeMediaId')){deletepayload['video']['nextEpisodeMediaId'];}context.setVariable('request.content',JSON.stringify(payload))}}elseif(video.hasOwnProperty('nextEpisodeMediaId')){deletepayload['video']['nextEpisodeMediaId'];context.setVariable('request.content',JSON.stringify(payload))}}else{context.setVariable('vixdebug.remove_empty_series_media_id','payload does not have a json video object')}}
Univision is looking to remove some json keys from the body if certain properties.
Here is the javascript code they currently use to remove it
PR: #347
The text was updated successfully, but these errors were encountered: