You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# eliminate any extra addresses at the front of this list, as they could be spoofed.
652
+
ifsettings.REVERSE_PROXY_DEPTH>0:
653
+
depth=settings.REVERSE_PROXY_DEPTH
654
+
else:
655
+
# special case for -1/negative: setting `depth` to 0 will not strip any items from the chain
656
+
depth=0
657
+
trusted_proxy_chain=full_proxy_chain[-depth:]
658
+
# accept the first (or only) address in the remaining trusted part of the chain as the actual remote address
659
+
returntrusted_proxy_chain[0].strip()
660
+
661
+
# fall back to "X-Real-Ip" if "X-Forwarded-For" isnt present
662
+
x_real_ip=req.META.get('HTTP_X_REAL_IP')
663
+
ifx_real_ip:
664
+
returnx_real_ip
665
+
666
+
# if we are not proxied (or we are proxied but the headers werent present and we fell through to here), just use the remote ip addr as the true client address
HEADER_DESCRIPTION="Discover, display and download real-time infectious disease indicators (time series) that track a variety of pathogens, diseases and syndromes in a variety of locations (primarily within the USA). Browse the list, or filter it first by locations and pathogens of interest, by surveillance categories, and more. Expand any row to expose and select from a set of related indicators, then hit 'Show Selected Indicators' at bottom to plot or export your selected indicators, or to generate code snippets to retrieve them from the Delphi Epidata API. Most indicators are served from the Delphi Epidata real-time repository, but some may be available only from third parties or may require prior approval."
0 commit comments