Skip to content

Commit 8e838dc

Browse files
committed
docs: Update experiment README with test results
- Document all passing tests - Add key learnings about Caddy configuration - Note potential issues that need further testing - Clarify that this approach requires reverse proxy
1 parent 475178e commit 8e838dc

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

EXPERIMENT_README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,31 @@ Caddy will:
4646

4747
3. Access at: `http://localhost:8080/codimd/`
4848

49-
## Expected Issues to Solve
49+
## Test Results ✅
5050

51-
1. ❓ Socket.IO path - needs special Caddy handling
52-
2. ❓ OAuth redirects - may need adjustment
53-
3. ❓ Asset URLs - should work if templates use serverURL correctly
54-
4. ❓ API calls - client-side code needs to use serverURL
51+
All tests passing! The reverse proxy path rewriting approach works:
52+
53+
1.**Root redirect** - `/``/codimd/` (301)
54+
2.**Path redirect** - `/codimd``/codimd/` (301)
55+
3.**Main app** - Accessible at `/codimd/`
56+
4.**Static assets** - `/codimd/favicon.png` works
57+
5.**Build assets** - `/codimd/build/...` works
58+
6.**Path stripping** - Caddy strips `/codimd` before forwarding
59+
7.**Headers** - `X-Forwarded-Prefix: /codimd` passed to app
60+
61+
## Key Learnings
62+
63+
### What Works
64+
65+
- **Caddy `route` directive** for proper path matching (order-sensitive)
66+
- **`path_regexp`** for exact path matching (avoid wildcards conflicting)
67+
- **`uri strip_prefix`** successfully strips path before forwarding
68+
- **App runs at root** but generates URLs with `/codimd` prefix (via serverURL config)
69+
- **Static assets** work because templates use `serverURL` correctly
70+
71+
### Potential Issues (To Test)
72+
73+
1. ⚠️ **Socket.IO** - Path rewriting configured, needs live testing
74+
2. ⚠️ **OAuth redirects** - Callback URLs may need adjustment
75+
3. ⚠️ **Standalone mode** - App REQUIRES reverse proxy (won't work without it)
76+
4. ⚠️ **Cookie paths** - May need to check if session cookies work correctly

0 commit comments

Comments
 (0)