Skip to content

Commit

Permalink
fix(rd-std/http): use proxy-authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed Jan 28, 2025
1 parent c6aed24 commit 24b2828
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/http_auth_server.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HTTP 代理服务器配置示例 - 带用户名密码认证
net:
direct:
type: direct
type: local
server:
http:
type: http
Expand Down
2 changes: 1 addition & 1 deletion rd-std/src/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async fn proxy(
// 验证认证信息
if !verify_auth(
req.headers()
.get("Authorization")
.get(hyper::http::header::PROXY_AUTHORIZATION)
.map(|h| h.to_str().unwrap_or("")),
username,
password,
Expand Down

0 comments on commit 24b2828

Please sign in to comment.