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) {
|
function workspaceUrl(projectId: string, repoId: string, workspaceId?: string) {
|
||||||
const base = `/projects/${projectId}/repositories/${repoId}/workspaces`;
|
const base = `/projects/${projectId}/repositories/${repoId}/workspaces`;
|
||||||
return workspaceId ? `${base}/${workspaceId}` : base;
|
return workspaceId ? `${base}/${workspaceId}/` : `${base}/`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listWorkspaces(
|
export async function listWorkspaces(
|
||||||
|
|||||||
+10
-4
@@ -1,4 +1,4 @@
|
|||||||
version: '3.8'
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# PostgreSQL Database
|
# PostgreSQL Database
|
||||||
@@ -14,7 +14,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
healthcheck:
|
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
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -76,10 +80,12 @@ services:
|
|||||||
context: ./apps/web
|
context: ./apps/web
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
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
|
container_name: hq-web
|
||||||
environment:
|
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:
|
ports:
|
||||||
- "3000:80"
|
- "3000:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user