Skip to content

Commit eba5aab

Browse files
🏗️ Use /admin prefix instead of /console to access admin console
1 parent 7f5703d commit eba5aab

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

caddy/config/Caddyfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
:80 {
2+
handle_path /api {
3+
reverse_proxy server:3000
4+
}
5+
26
handle_path /api/* {
37
reverse_proxy server:3000
48
}
@@ -7,7 +11,11 @@
711
reverse_proxy server:3000
812
}
913

10-
handle /console/* {
14+
handle /admin {
15+
reverse_proxy console:3000
16+
}
17+
18+
handle /admin/* {
1119
reverse_proxy console:3000
1220
}
1321

cloud-proxy/Caddyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{$CLOUD_CONSOLE_URL}:443 {
1010
@console {
11-
path /console/*
11+
path /admin/*
1212
}
1313

1414
@api {
@@ -24,7 +24,7 @@
2424
}
2525

2626
handle {
27-
rewrite * /console{path}
27+
redir * /admin{path}
2828
reverse_proxy gateway
2929
}
3030
}

console/src/lib/routes/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const basePath = "/console";
1+
const basePath = "/admin";
22

33
export const homeRoute = {
44
path: () => `${basePath}/project/overview`

console/src/lib/services/oauth/signInWithRedirect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const signInWithRedirect = async (provider: OAuthProvider): Promise<void>
1010

1111
const params: AuthorizationParams = {
1212
client_id: provider.clientId,
13-
redirect_uri: `${window.location.origin}/console/oauth/handler/${provider.id}`,
13+
redirect_uri: `${window.location.origin}/admin/oauth/handler/${provider.id}`,
1414
response_type: provider.responseType,
1515
scope: provider.scopes.join(" "),
1616
include_granted_scopes: "true",

console/svelte.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const config = {
88
preprocess: vitePreprocess(),
99
kit: {
1010
paths: {
11-
base: "/console"
11+
base: "/admin"
1212
},
1313
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1414
// If your environment is not supported or you settled on a specific environment, switch out the adapter.

0 commit comments

Comments
 (0)