fix: trust docker gateway IP for reverse proxy auth
Deploy Dashboard / deploy (push) Successful in 1m35s
Deploy Dashboard / deploy (push) Successful in 1m35s
This commit is contained in:
@@ -117,7 +117,8 @@ def _classify(method, path, status, user):
|
||||
@router.get("/openclaw-token")
|
||||
def openclaw_token(request: Request):
|
||||
ip = request.client.host
|
||||
if ip in ("127.0.0.1", "::1"):
|
||||
import config
|
||||
if config.is_trusted_proxy(ip):
|
||||
forwarded = request.headers.get("x-forwarded-for", "").split(",")[0].strip()
|
||||
if forwarded:
|
||||
ip = forwarded
|
||||
|
||||
Reference in New Issue
Block a user