mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-24 21:38:09 +02:00
fix: update server URL in README and settings for SurfSense plugin
This commit is contained in:
parent
20ce687b6d
commit
1f524660e1
6 changed files with 26 additions and 6 deletions
|
|
@ -1,4 +1,9 @@
|
|||
NEXT_PUBLIC_FASTAPI_BACKEND_URL=http://localhost:8000
|
||||
|
||||
# Server-only. Backend URL behind the /api/v1/* proxy in next.config.ts.
|
||||
# Falls back to NEXT_PUBLIC_FASTAPI_BACKEND_URL when unset.
|
||||
BACKEND_PROXY_TARGET=https://your-internal-backend.example.com
|
||||
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL or GOOGLE
|
||||
NEXT_PUBLIC_ETL_SERVICE=UNSTRUCTURED or LLAMACLOUD or DOCLING
|
||||
NEXT_PUBLIC_ZERO_CACHE_URL=http://localhost:4848
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const PLUGIN_RELEASES_URL =
|
|||
"https://github.com/MODSetter/SurfSense/releases?q=obsidian&expanded=true";
|
||||
|
||||
const BACKEND_URL =
|
||||
process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ?? "https://api.surfsense.com";
|
||||
process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ?? "https://surfsense.com";
|
||||
|
||||
/**
|
||||
* Obsidian connect form for the plugin-only architecture.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,21 @@ const nextConfig: NextConfig = {
|
|||
},
|
||||
},
|
||||
|
||||
// Proxy /api/v1/* to the FastAPI backend. Keeps the real backend host
|
||||
// out of the client bundle. BACKEND_PROXY_TARGET is server-only.
|
||||
async rewrites() {
|
||||
const target =
|
||||
process.env.BACKEND_PROXY_TARGET ||
|
||||
process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ||
|
||||
"http://localhost:8000";
|
||||
return [
|
||||
{
|
||||
source: "/api/v1/:path*",
|
||||
destination: `${target.replace(/\/+$/, "")}/api/v1/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
// Configure webpack (SVGR)
|
||||
webpack: (config) => {
|
||||
// SVGR: import *.svg as React components
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue