fix: add trailing slash to workspace API URLs
FastAPI auto-redirects /workspaces to /workspaces/ with 307. Behind Traefik (HTTP internal), the 307 becomes http://, triggering Mixed Content in the browser. Adding trailing slashes avoids the redirect entirely.
This commit is contained in:
@@ -9,7 +9,7 @@ import type {
|
||||
|
||||
function workspaceUrl(projectId: string, repoId: string, workspaceId?: string) {
|
||||
const base = `/projects/${projectId}/repositories/${repoId}/workspaces`;
|
||||
return workspaceId ? `${base}/${workspaceId}` : base;
|
||||
return workspaceId ? `${base}/${workspaceId}/` : `${base}/`;
|
||||
}
|
||||
|
||||
export async function listWorkspaces(
|
||||
|
||||
+10
-4
@@ -1,4 +1,4 @@
|
||||
version: '3.8'
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
# PostgreSQL Database
|
||||
@@ -14,7 +14,11 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-headquarter} -d ${POSTGRES_DB:-headquarter}"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"pg_isready -U ${POSTGRES_USER:-headquarter} -d ${POSTGRES_DB:-headquarter}",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -76,10 +80,12 @@ services:
|
||||
context: ./apps/web
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_API_BASE_URL: http://localhost:8000
|
||||
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8000}
|
||||
VITE_APP_URL: ${VITE_APP_URL:-http://localhost:3000}
|
||||
container_name: hq-web
|
||||
environment:
|
||||
VITE_API_BASE_URL: http://localhost:8000
|
||||
# These are only for documentation; Vite bakes values at build time.
|
||||
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8000}
|
||||
ports:
|
||||
- "3000:80"
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user