From a50813931b1b1935ba0254f42757aff03eb8d3e1 Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 19:07:02 +0000 Subject: [PATCH 1/3] fix(frontend): allow localhost dev origins Expands Next.js allowedDevOrigins to include localhost/127.0.0.1 to reduce dev proxy ECONNRESET when binding next dev to 127.0.0.1. --- frontend/next.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/next.config.ts b/frontend/next.config.ts index e594f65..8c034bc 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -1,7 +1,11 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - allowedDevOrigins: ["192.168.1.101"], + // In dev, Next may proxy requests based on the request origin/host. + // Allow common local origins so `next dev --hostname 127.0.0.1` works + // when users access via http://localhost:3000 or http://127.0.0.1:3000. + // Keep the LAN IP as well for dev on the local network. + allowedDevOrigins: ["192.168.1.101", "localhost", "127.0.0.1"], images: { remotePatterns: [ { From 4d898dbb596612450f6ae3566a47ba43b4a63740 Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 19:10:05 +0000 Subject: [PATCH 2/3] docs(frontend): clarify dev origin restrictions Update frontend README note to explain host/origin mismatch and allowedDevOrigins when seeing proxy ECONNRESET in next dev. --- frontend/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/README.md b/frontend/README.md index 52ddef7..e5d5820 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -157,8 +157,6 @@ Clerk should be **off** unless you set a real `pk_test_...` or `pk_live_...` pub ### Dev server blocked by origin restrictions -`next.config.ts` sets: +`next.config.ts` sets `allowedDevOrigins` for dev proxy safety. -- `allowedDevOrigins: ["192.168.1.101"]` - -If you’re developing from a different hostname/IP, you may need to update `allowedDevOrigins` (or use `npm run dev` on localhost). \ No newline at end of file +If you see repeated proxy errors (often `ECONNRESET`), make sure your dev server hostname and browser URL match (e.g. `localhost` vs `127.0.0.1`), and that your origin is included in `allowedDevOrigins`. \ No newline at end of file From 1ccc4c478f70c8337549b056b312556cd5a2a514 Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 19:19:40 +0000 Subject: [PATCH 3/3] fix: flake8 trailing blank lines Remove trailing blank line at EOF to satisfy flake8 W391. --- backend/app/api/souls_directory.py | 1 - backend/app/schemas/souls_directory.py | 1 - backend/tests/test_souls_directory.py | 1 - 3 files changed, 3 deletions(-) diff --git a/backend/app/api/souls_directory.py b/backend/app/api/souls_directory.py index c66ce8d..73565a9 100644 --- a/backend/app/api/souls_directory.py +++ b/backend/app/api/souls_directory.py @@ -71,4 +71,3 @@ async def get_markdown( except Exception as exc: raise HTTPException(status_code=status.HTTP_502_BAD_GATEWAY, detail=str(exc)) from exc return SoulsDirectoryMarkdownResponse(handle=safe_handle, slug=safe_slug, content=content) - diff --git a/backend/app/schemas/souls_directory.py b/backend/app/schemas/souls_directory.py index 1902e73..aff2192 100644 --- a/backend/app/schemas/souls_directory.py +++ b/backend/app/schemas/souls_directory.py @@ -18,4 +18,3 @@ class SoulsDirectoryMarkdownResponse(BaseModel): handle: str slug: str content: str - diff --git a/backend/tests/test_souls_directory.py b/backend/tests/test_souls_directory.py index cb42728..f318a7b 100644 --- a/backend/tests/test_souls_directory.py +++ b/backend/tests/test_souls_directory.py @@ -26,4 +26,3 @@ def test_search_souls_matches_handle_or_slug() -> None: ] assert search_souls(refs, query="writer", limit=20) == [refs[1]] assert search_souls(refs, query="thedaviddias", limit=20) == [refs[0], refs[1]] -