Skip to content

Commit

Permalink
fix: allow unicode in name for grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Nov 27, 2024
1 parent b6f28de commit 8693485
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adminpage/sport/views/grafana_proxy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import urllib.parse
from revproxy.views import ProxyView


Expand All @@ -8,7 +9,7 @@ def get_proxy_request_headers(self, request):
headers = super(GrafanaProxyView, self).get_proxy_request_headers(request)
# Pass authentication to Grafana
headers['X-WEBAUTH-EMAIL'] = request.user.email
headers['X-WEBAUTH-NAME'] = (request.user.first_name + ' ' + request.user.last_name).strip()
headers['X-WEBAUTH-NAME'] = urllib.parse.quote((request.user.first_name + ' ' + request.user.last_name).strip())
# Set original Host
headers['Host'] = request.get_host()
return headers

0 comments on commit 8693485

Please # to comment.