diff --git a/Dockerfile b/Dockerfile
index bd457e90..4a2cc68b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -53,10 +53,6 @@ RUN pnpm install --production && rm -rf /root/.npm /root/.pnpm-store /usr/local/
COPY /service /app
-COPY --from=frontend /app/replace-title.sh /app
-
-RUN chmod +x /app/replace-title.sh
-
COPY --from=frontend /app/dist /app/public
COPY --from=backend /app/build /app/build
@@ -65,4 +61,4 @@ COPY --from=backend /app/src/utils/templates /app/build/utils/templates
EXPOSE 3002
-CMD ["sh", "-c", "./replace-title.sh && node --import tsx/esm ./build/index.js"]
+CMD ["sh", "-c", "node --import tsx/esm ./build/index.js"]
diff --git a/index.html b/index.html
index afb3ac26..8096a3b3 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
-
${SITE_TITLE}
+ Loading -ˋˏ✄┈┈┈┈
diff --git a/replace-title.sh b/replace-title.sh
deleted file mode 100644
index d488f6a2..00000000
--- a/replace-title.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-SITE_TITLE=${SITE_TITLE:-ChatGPT Web}
-
-sed -i -E "s/([^<]*)<\/title>/${SITE_TITLE}<\/title>/g" /app/public/index.html
\ No newline at end of file
diff --git a/service/src/storage/config.ts b/service/src/storage/config.ts
index 0cd3cc89..67011987 100644
--- a/service/src/storage/config.ts
+++ b/service/src/storage/config.ts
@@ -42,7 +42,7 @@ export async function getOriginConfig() {
: '',
process.env.HTTPS_PROXY,
new SiteConfig(
- process.env.SITE_TITLE || 'ChatGpt Web',
+ process.env.SITE_TITLE || 'ChatGPT Web',
isNotEmptyString(process.env.AUTH_SECRET_KEY),
process.env.AUTH_SECRET_KEY,
process.env.REGISTER_ENABLED === 'true',
diff --git a/src/router/permission.ts b/src/router/permission.ts
index 5cfc2bdf..8e23d3f8 100644
--- a/src/router/permission.ts
+++ b/src/router/permission.ts
@@ -8,6 +8,7 @@ export function setupPageGuard(router: Router) {
if (!authStore.session) {
try {
const data = await authStore.getSession()
+ document.title = data.title
if (String(data.auth) === 'false' && authStore.token)
await authStore.removeToken()
else