Default the Web App to :8090 (BFF) in the API Server

Point the API Server's Web App references at the production BFF port
instead of the Vite dev port (5173): the WEBAPP_URL default probed by
/api/status, and the panel's Web App URL / allowed-origins placeholders.
Update .env.example and the README env table to match. Rebuild the
embedded admin panel dist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tajniak81
2026-07-18 14:33:26 +02:00
co-authored by Claude Opus 4.8
parent 2eeff15925
commit 367113f538
6 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ POCKETBASE_ADMIN_PASSWORD=
# CORS allowed origins for browser clients (comma separated, or * for any).
# Native mobile apps are not subject to CORS. Editable at runtime from the panel
# (Web App section), which writes the change back into this file.
CORS_ALLOW_ORIGINS=http://localhost:5173
CORS_ALLOW_ORIGINS=http://localhost:8090
# Web App address, probed by GET /api/status and shown on the panel. Editable at
# runtime from the panel (Web App section).
WEBAPP_URL=http://localhost:5173
WEBAPP_URL=http://localhost:8090
# PocketBase auth collection holding app users (default: users).
AUTH_USERS_COLLECTION=users
+1 -1
View File
@@ -211,7 +211,7 @@ Copy `.env.example` to `.env` and fill in. Summary:
| `POCKETBASE_URL` | `http://10.2.1.10:8027` | PocketBase base URL |
| `POCKETBASE_ADMIN_EMAIL` / `_PASSWORD` | — | superuser service account |
| `CORS_ALLOW_ORIGINS` | `*` | comma-separated browser origins |
| `WEBAPP_URL` | `http://localhost:5173` | probed by `/api/status` |
| `WEBAPP_URL` | `http://localhost:8090` | probed by `/api/status` |
| `AUTH_USERS_COLLECTION` | `users` | PocketBase auth collection |
| `PLUGINS_FILE` | `plugins.json` | plugin state store |
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#2563eb" />
<title>DriverVault · API Server</title>
<script type="module" crossorigin src="/assets/index-CL6eq5qV.js"></script>
<script type="module" crossorigin src="/assets/index-frPmZHwa.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D3MeNcl7.css">
</head>
<body>
+1 -1
View File
@@ -47,7 +47,7 @@ func Load() Config {
return Config{
Addr: normalizeAddr(firstEnv("API_ADDR", "PORT"), ":8080"),
PocketBaseURL: strings.TrimRight(firstEnvOr("http://10.2.1.10:8027", "POCKETBASE_URL", "PB_URL"), "/"),
WebAppURL: strings.TrimRight(getenv("WEBAPP_URL", "http://localhost:5173"), "/"),
WebAppURL: strings.TrimRight(getenv("WEBAPP_URL", "http://localhost:8090"), "/"),
AllowOrigins: splitCSV(firstEnvOr("*", "CORS_ALLOW_ORIGINS", "CORS_ORIGINS")),
UsersCollection: getenv("AUTH_USERS_COLLECTION", "users"),
PluginsFile: getenv("PLUGINS_FILE", "plugins.json"),
@@ -91,7 +91,7 @@ async function save() {
<div class="flex flex-col gap-4 px-5 py-4">
<div>
<label class="dh-label" for="web-url">{{ t("webapp.baseUrl") }}</label>
<input id="web-url" v-model="form.url" class="dh-input" placeholder="http://localhost:5173" />
<input id="web-url" v-model="form.url" class="dh-input" placeholder="http://localhost:8090" />
</div>
<div>
@@ -100,7 +100,7 @@ async function save() {
id="web-origins"
v-model="form.origins"
class="dh-input"
placeholder="http://localhost:5173, https://app.example.com"
placeholder="http://localhost:8090, https://app.example.com"
/>
<p class="mt-1 text-xs text-muted">
{{ tSplit("webapp.originsHint", "star").before