Skip to content

Commit d55c49f

Browse files
authored
add request x-forwarded-for (#241) (#242)
1 parent c34ab48 commit d55c49f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

provider/motanProvider.go

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ func (m *MotanProvider) Initialize() {
5555

5656
func (m *MotanProvider) Call(request motan.Request) motan.Response {
5757
if m.IsAvailable() {
58+
// x-forwared-for
59+
request.SetAttachment("x-forwarded-for", request.GetAttachment(motan.HostKey))
5860
return m.ep.Call(request)
5961
}
6062
t := time.Now().UnixNano()

0 commit comments

Comments
 (0)