From d5f8dfc1d797e8dc0bb00a1b5992615a5b26a6d6 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Sat, 20 Jun 2026 21:49:37 +0700 Subject: [PATCH] fix: auto-detect base URL from window.location.origin - public/test-api.html: value di baseUrl input kosong, apiBase() fallback ke window.location.origin, plus DOMContentLoaded listener utk auto-fill - api/test-api-content.ts: sama (legacy Next.js route) - Router.ts handleDocs() sudah pakai pendekatan ini sebelumnya --- api/test-api-content.ts | 3 ++- public/test-api.html | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/test-api-content.ts b/api/test-api-content.ts index f8acb33..4cba29d 100644 --- a/api/test-api-content.ts +++ b/api/test-api-content.ts @@ -1 +1,2 @@ -export default "\n\n\n \n \n Edge Proxy — API Test\n \n\n\n
\n

Edge Proxy Relay — API Test

\n

Test all proxy endpoints from the browser

\n\n \n
\n
\n AUTH API Key\n \n
\n
\n \n
\n \n \n
\n
\n
\n\n \n
\n
\n GET /health\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n GET /v1/models\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n POST /v1/chat/completions\n \n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n POST /v1/messages (Anthropic)\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n RELAY Generic HTTP Relay\n \n
\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n\n
\n
\n\n\n\n\n"; +export default "\n\n\n \n \n Edge Proxy — API Test\n \n\n\n
\n

Edge Proxy Relay — API Test

\n

Test all proxy endpoints from the browser

\n\n \n
\n
\n AUTH API Key\n \n
\n
\n \n
\n \n \n
\n
\n
\n\n \n
\n
\n GET /health\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n GET /v1/models\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n POST /v1/chat/completions\n \n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n POST /v1/messages (Anthropic)\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n RELAY Generic HTTP Relay\n \n
\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n\n
\n
\n\n\n\n\n"; diff --git a/public/test-api.html b/public/test-api.html index 323cefd..e0bc772 100644 --- a/public/test-api.html +++ b/public/test-api.html @@ -52,7 +52,7 @@
- +
@@ -141,7 +141,7 @@