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

feat: 增强 http-proxy #2567

Closed
wants to merge 1 commit into from
Closed

Conversation

huangapple
Copy link
Contributor

feat: 增强 http-proxy
#2564

@huangapple huangapple force-pushed the feat_http-proxy branch 2 times, most recently from 84f643e to fc1e05b Compare December 8, 2022 18:58
@czy88840616
Copy link
Member

我理解是不是只是希望忽略 https 的证书验证?这里感觉不应该透出 axios 所有的参数。

@huangapple
Copy link
Contributor Author

增强功能, 目前我遇到的是 忽略 https 的证书验证, 但axios的其它参数配置, 早晚会遇到的。

@huangapple
Copy link
Contributor Author

我单测里写的就是 禁止302自动重定向, https忽略测试,单测不太好写。但我实际使用 没有问题

@czy88840616
Copy link
Member

我觉得应该需要什么能力再开放什么能力,把 axios 的所有配置都放出,会过于和 axios 结合的紧密,毕竟 axios 只是其中的一种实现方式(很有可能后面就不用 axios 了),同时 axios 还只是一个 http 请求库,而 proxy 只是代理,组件可以只暴露需要的配置和能力。如果只需要忽略 https 证书的验证,甚至都不用放出配置,是不是默认忽略就行了。

@huangapple
Copy link
Contributor Author

嗯,你说得对, 从Midway的角度上看, 直接这样放开确实是不合适。
不过长期来看, 肯定会慢慢遇到这些参数的使用场景,反馈一个处理一个也不算一个非常好的办法。
midway应该也不必太花精力放在这http-proxy上, 也许文档上标明清楚就好?

@czy88840616
Copy link
Member

从我们的角度来说,既然是自己维护的组件,那肯定要负责考虑研发,升级,维护策略,不会随意的开放能力,宁缺毋滥的,所以功能和配置的增加会很谨慎。

@huangapple
Copy link
Contributor Author

嗯嗯, 明白。

@huangapple huangapple closed this Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants