diff --git a/.gitignore b/.gitignore index 25650406..29e275b7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,10 @@ __pycache__/ # Virtual Environment .venv/ -env/ venv/ -*.env* + +# Enviroment Variable Files +.env # Build / Distribution dist/ diff --git a/lightrag_webui/.env.development b/lightrag_webui/.env.development new file mode 100644 index 00000000..5a6ac93f --- /dev/null +++ b/lightrag_webui/.env.development @@ -0,0 +1,4 @@ +# Development environment configuration +VITE_BACKEND_URL=http://localhost:9621 +VITE_API_PROXY=true +VITE_API_ENDPOINTS=/api,/documents,/graphs,/graph,/health,/query,/docs,/redoc,/openapi.json,/login,/auth-status diff --git a/lightrag_webui/env.development.smaple b/lightrag_webui/env.development.smaple index 080cf95f..5a6ac93f 100644 --- a/lightrag_webui/env.development.smaple +++ b/lightrag_webui/env.development.smaple @@ -1,2 +1,4 @@ # Development environment configuration -VITE_BACKEND_URL=/api +VITE_BACKEND_URL=http://localhost:9621 +VITE_API_PROXY=true +VITE_API_ENDPOINTS=/api,/documents,/graphs,/graph,/health,/query,/docs,/redoc,/openapi.json,/login,/auth-status diff --git a/lightrag_webui/env.local.sample b/lightrag_webui/env.local.sample index 0cd53ad5..d8920437 100644 --- a/lightrag_webui/env.local.sample +++ b/lightrag_webui/env.local.sample @@ -1,3 +1,3 @@ VITE_BACKEND_URL=http://localhost:9621 VITE_API_PROXY=true -VITE_API_ENDPOINTS=/,/api,/documents,/graphs,/graph,/health,/query,/docs,/openapi.json,/login,/auth-status +VITE_API_ENDPOINTS=/api,/documents,/graphs,/graph,/health,/query,/docs,/redoc,/openapi.json,/login,/auth-status diff --git a/lightrag_webui/vite.config.ts b/lightrag_webui/vite.config.ts index 2957b743..5cb52992 100644 --- a/lightrag_webui/vite.config.ts +++ b/lightrag_webui/vite.config.ts @@ -40,7 +40,7 @@ export default defineConfig({ changeOrigin: true, rewrite: endpoint === '/api' ? (path) => path.replace(/^\/api/, '') : - endpoint === '/docs' || endpoint === '/openapi.json' ? + endpoint === '/docs' || endpoint === '/redoc' || endpoint === '/openapi.json' ? (path) => path : undefined } ])