Allow local proxy GenAsset setup

This commit is contained in:
Stelios Sotiriadis
2026-05-21 01:19:04 +01:00
parent e9399fa7cd
commit 1754572b85
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ ComfyUI nodes for saving, loading, and versioning image generations in **GenAsse
GenAsset keeps the output image together with the recipe (prompt, model, seed, sampler/scheduler, workflow JSON, metadata), so teams and agents can reproduce and reuse results reliably.
Current package version: **v1.0.18**.
Current package version: **v1.0.19**.
## Start Free
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "genasset"
version = "1.0.18"
version = "1.0.19"
description = "ComfyUI nodes for saving, loading, and versioning GenAsset generations."
license = { file = "LICENSE" }
requires-python = ">=3.10"
+6 -1
View File
@@ -143,10 +143,15 @@ def _same_origin_block(request: web.Request) -> web.Response | None:
if not origin:
return None
try:
origin_host = urllib.parse.urlparse(origin).netloc.lower()
origin_parts = urllib.parse.urlparse(origin)
origin_host = origin_parts.netloc.lower()
origin_name = (origin_parts.hostname or "").lower()
except Exception:
origin_host = ""
origin_name = ""
request_host = str(request.headers.get("Host") or getattr(request, "host", "") or "").lower()
if origin_name in {"localhost", "127.0.0.1", "::1"}:
return None
if origin_host and request_host and origin_host != request_host:
return web.json_response(
{"ok": False, "error": "Cross-origin GenAsset setup requests are not allowed."},