Browse Source

HUE-8173 [core] Add a log line when a user loads a page not via the load balancer even if we have one

Romain Rigaux 7 years ago
parent
commit
f23c09a79a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      desktop/core/src/desktop/views.py

+ 1 - 0
desktop/core/src/desktop/views.py

@@ -524,6 +524,7 @@ def get_banner_message(request):
     (not forwarded_host or not any(forwarded_host in lb for lb in HUE_LOAD_BALANCER.get())):
     message = _('You are accessing a non-optimized Hue, please switch to one of the available addresses: %s') % \
       (", ".join(['<a href="%s" style="color: #FFF; font-weight: bold">%s</a>' % (host, host) for host in HUE_LOAD_BALANCER.get()]))
+    LOG.warn('User %s is bypassing the load balancer' % request.user.username)
 
   if message:
     banner_message = '<div style="padding: 4px; text-align: center; background-color: #003F6C; height: 24px; color: #DBE8F1">%s</div>' % message