问题
I am working on jwplayer and I just want to hide/encrypt the ajax requests that are sent by jwplayer to play the video. The reason is this when jwplayer send request it contains video id and I don't want to reveal it because it is streaming from google drive and any one can leach the same video. Is there any method to hide/encrypt ajax calls from console?
I have tried clear console method console.clear(); but it clears console not network tab.
回答1:
As Max says you can't hide requests and/or stop someone from capturing any video which you download to your site.
The usual solution is to encrypt the video so it can't be viewed or played without a key.
回答2:
Your code doesn't have access to network tab. Network tab shows requests/responses client browser sends. Even if you somehow manage to hide your requests from browsers network tab, client still can see req/res via tools like wireshark.
So you need to introduce some middle-ware between jwplayer and google drive, that will be responsible for securely fetching videos from google drive and serving them to jwplayer without exposing internal id's.
来源:https://stackoverflow.com/questions/44869809/how-to-hide-encrypt-the-ajax-requests-from-network-tab-in-google-and-other-brows