Skip to content

Commit

Permalink
rsa加密后响应头传输application/octet-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Dot-Liu committed Dec 26, 2023
1 parent 47b4b40 commit 238218a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/plugins/rsa-filter/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (e *executor) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IC
}
}

// 转发时传输铭文
// 转发时传输明文
ctx.Proxy().Body().SetRaw(orgContentType, decrBody)
ctx.Proxy().Header().SetHeader("Content-Type", orgContentType)
if next != nil {
Expand Down Expand Up @@ -95,7 +95,7 @@ func (e *executor) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IC
}

ctx.Response().SetBody(encBody)
ctx.Response().SetHeader("Content-Type", ctx.Request().ContentType())
ctx.Response().SetHeader("Content-Type", "application/octet-stream")
ctx.Response().SetHeader("Origin-Content-Type", responseContentType)
return
}
Expand Down

0 comments on commit 238218a

Please sign in to comment.