EIDA / mediatorws

EIDA NG Mediator/Federator web services
GNU General Public License v3.0
6 stars 6 forks source link

Adding X-Forwarded-For to HTTP request headers #71

Closed Jollyfant closed 3 years ago

Jollyfant commented 5 years ago

The user IP should be forwarded to the endpoint through the appropriate HTTP header. I am not sure of the easiest way to propagate the address all the way down to RequestHandlerBase.

Jollyfant commented 5 years ago

From http://flask.pocoo.org/docs/1.0/reqcontext/ I assume it can be as simple as adding..

from flask import request
print(request.remote_addr)
Jollyfant commented 5 years ago

Started this in #73

damb commented 3 years ago

Fixed at https://github.com/damb/eidaws. The original client IP is forwarded to endpoints using the X-Forwarded-For HTTP header field.