diff --git a/aio.Caddyfile b/aio.Caddyfile index 65919f6e8..3c58b0b60 100644 --- a/aio.Caddyfile +++ b/aio.Caddyfile @@ -1,11 +1,13 @@ :3000 { - try_files {path} / root * /site/selfhost-web file_server -} -:3100 { - try_files {path} / - root * /site/sh-admin - file_server + handle_path /admin* { + root * /site/sh-admin + file_server + } + + handle_path /backend* { + reverse_proxy localhost:3170 + } } diff --git a/packages/hoppscotch-sh-admin/vite.config.ts b/packages/hoppscotch-sh-admin/vite.config.ts index c19cce8f7..1722c2b3e 100644 --- a/packages/hoppscotch-sh-admin/vite.config.ts +++ b/packages/hoppscotch-sh-admin/vite.config.ts @@ -15,6 +15,7 @@ import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; export default defineConfig({ envPrefix: process.env.HOPP_ALLOW_RUNTIME_ENV ? 'VITE_BUILDTIME_' : 'VITE_', envDir: path.resolve(__dirname, '../..'), + base: '/admin/', server: { port: 3100, },