Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么保护key文件? 加403访问权限有用吗? #6

Closed
asleep2 opened this issue Dec 2, 2018 · 1 comment
Closed

怎么保护key文件? 加403访问权限有用吗? #6

asleep2 opened this issue Dec 2, 2018 · 1 comment

Comments

@asleep2
Copy link

asleep2 commented Dec 2, 2018

https://www.hostloc.com/thread-500295-1-1.html

@hauk0101
Copy link
Owner

hauk0101 commented Dec 7, 2018

@asleep2
403只是服务器响应客户端请求的一个状态值,它可以是403,也可以是404 等等,重要的是让非法请求无法正常请求到 key 文件即可。
参考过程:

  1. 你在发起请求 key 文件时,服务端响应的过程中,会先判断当前请求是否包含合法的校验数据,如有效token,有效时间,有效用户权限等等。
  2. 如果合法,则返回正常的200状态值,使客户端能够正常解析key文件,并能正常播放视频。
  3. 否则返回异常的数据,使得客户端无法正常解析key文件,无法正常播放视频,也就达到了加密的目的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants