kb topic search + client-ip port strip + application notes html
This commit is contained in:
@@ -17,11 +17,10 @@ dashboarddefaults_bp = Blueprint('dashboarddefaults', __name__)
|
||||
|
||||
|
||||
def _request_ip():
|
||||
"""Caller IP, honoring a single proxy hop via X-Forwarded-For."""
|
||||
forwarded = request.headers.get('X-Forwarded-For')
|
||||
if forwarded:
|
||||
return forwarded.split(',')[0].strip()
|
||||
return request.remote_addr
|
||||
"""Caller IP for the IP fallback, port stripped so it matches a stored
|
||||
(portless) DashboardDefault.ipaddress. ARR forwards clientip:port."""
|
||||
from shopdb.utils.clientip import client_ip
|
||||
return client_ip(request)
|
||||
|
||||
|
||||
def _serialize(default):
|
||||
|
||||
Reference in New Issue
Block a user