This commit is contained in:
WJQSERVER 2025-01-03 21:20:10 +08:00
parent 972baee564
commit a0e5846e11
3 changed files with 24 additions and 17 deletions

View file

@ -1,5 +1,10 @@
# 更新日志
25w01e
---
- PRE-RELEASE: 此版本是v1.8.0的预发布版本,请勿在生产环境中使用
- FIX: 修复引入token参数透传功能导致的一些问题
25w01d
---
- PRE-RELEASE: 此版本是v1.8.0的预发布版本,请勿在生产环境中使用

View file

@ -1 +1 @@
25w01d
25w01e

View file

@ -281,6 +281,7 @@ func setRequestHeaders(c *gin.Context, req *req.Request) {
func authPassThrough(c *gin.Context, cfg *config.Config, req *req.Request) {
if cfg.Auth.PassThrough {
token := c.Query("token")
if token != "" {
switch cfg.Auth.AuthMethod {
case "parameters":
if !cfg.Auth.Enabled {
@ -303,6 +304,7 @@ func authPassThrough(c *gin.Context, cfg *config.Config, req *req.Request) {
}
}
}
}
// 复制响应体
func copyResponseBody(c *gin.Context, respBody io.Reader) error {