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

[Question] 为什么默认是禁用重定向的呢 #36

Open
coolight7 opened this issue Aug 5, 2023 · 1 comment
Open

[Question] 为什么默认是禁用重定向的呢 #36

coolight7 opened this issue Aug 5, 2023 · 1 comment

Comments

@coolight7
Copy link

  • 嗨哥们,我翻到代码里 [WdDio] 的构造函数中有这么一行:
    // 禁止重定向
    this.options.followRedirects = false;
  • 为什么要禁止重定向呢,是因为考虑到重定向可能会把请求头字段 [authorization] 给带过去不安全嘛?
@hgmmym
Copy link

hgmmym commented Mar 3, 2024

@coolight7 因为如果通讯中间被“中间人劫持”,劫持者使用302将你的请求转发到劫持者的服务器,那么,劫持者可能就可以监听你的通讯的所有内容。

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