edgeone 1.6.22 → 1.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -582,6 +582,21 @@ async def app(scope: dict, receive, send) -> None:
|
|
|
582
582
|
|
|
583
583
|
# 统一日志:path + scfRequestId + statusCode 合并为一条
|
|
584
584
|
print(f"Makers request path: {_pages_full_path} |scfRequestId={_scf_request_id}|statusCode={result.status}|", file=sys.stderr, flush=True)
|
|
585
|
+
_eo_pages_host = headers.get("eo-pages-host", "")
|
|
586
|
+
_host_header = headers.get("host", "")
|
|
587
|
+
if not _eo_pages_host or _eo_pages_host in ("localhost:9000", "undefined", "null") or _host_header == "localhost:9000":
|
|
588
|
+
_info = {
|
|
589
|
+
"host": _host_header,
|
|
590
|
+
"user-agent": headers.get("user-agent", ""),
|
|
591
|
+
"eo-pages-host": _eo_pages_host,
|
|
592
|
+
"eo-connecting-ip": headers.get("eo-connecting-ip", ""),
|
|
593
|
+
"x-forwarded-for": headers.get("x-forwarded-for", ""),
|
|
594
|
+
"x-real-ip": headers.get("x-real-ip", ""),
|
|
595
|
+
"functions-request-id": headers.get("functions-request-id", ""),
|
|
596
|
+
"path": path,
|
|
597
|
+
"url": _pages_full_path,
|
|
598
|
+
}
|
|
599
|
+
print(f"Makers request info: {json.dumps(_info, ensure_ascii=False)}", file=sys.stderr, flush=True)
|
|
585
600
|
|
|
586
601
|
# Send response
|
|
587
602
|
response_headers = [(k.encode(), str(v).encode()) for k, v in result.headers.items()]
|