Opened 4 years ago

#3363 new bug

web-ui logs do not show real ip when proxied

Reported by: armagedon Owned by:
Priority: minor Milestone: 2.x
Component: Unknown Version: 2.0.3
Keywords: web-ui nginx Cc:



I'm using nginx to proxify the web-ui. I want to use fail2ban to secure my installation. but the web-ui logs only contains local ip :

13:08:35 [ERROR   ][deluge.ui.web.auth         :256 ] Login failed (ClientIP

I've make many test in nginx config file, bot can't make it work. here the part that supposed to send the original IP :

	proxy_set_header        X-Real-IP               $remote_addr;
	proxy_set_header        X-Forwarded-Host        $host;
	proxy_set_header        X-Forwarded-Server      $host;
	proxy_set_header        X-Forwarded-For         $proxy_add_x_forwarded_for;
	proxy_set_header        X-Forwarded-Port        $server_port;
	proxy_set_header        X-Forwarded-Ssl         on;
	proxy_set_header        X-Forwarded-Proto       $scheme;

the part of the deluge code making the log (

log.error('Login failed from %s', __request__.getClientIP())

do you think, it should call something else than getClientIP ?

thank you.

Change History (0)

Note: See TracTickets for help on using tickets.