Refactor restricted app paths and naming.

This commit is contained in:
2025-12-02 19:10:13 +00:00
parent eedbd4aaa4
commit 5d9d2b794d
10 changed files with 18 additions and 17 deletions
@@ -1 +1 @@
<html style="background: transparent"><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><div id="app"></div><script type="module" src="/src/restricted-api/main.js"></script>
<html style="background: transparent"><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><div id="app"></div><script type="module" src="/src/restricted/api/main.js"></script>
@@ -7,6 +7,6 @@
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/restricted/main.js"></script>
<script type="module" src="/src/restricted/forward/main.js"></script>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
import { createApp } from 'vue'
import RestrictedApiApp from './RestrictedApiApp.vue'
import '@/assets/style.css'
createApp(RestrictedApiApp).mount('#app')
+5
View File
@@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import '@/assets/style.css'
createApp(App).mount('#app')
+5
View File
@@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import '@/assets/style.css'
createApp(App).mount('#app')
-5
View File
@@ -1,5 +0,0 @@
import { createApp } from 'vue'
import RestrictedApp from './RestrictedApp.vue'
import '@/assets/style.css'
createApp(RestrictedApp).mount('#app')
+4 -3
View File
@@ -40,8 +40,9 @@ export default defineConfig(({ command }) => ({
bypass: (req) => {
const url = req.url?.split('?')[0]
if (url?.startsWith('/auth/assets/')) return url.slice(5)
if (url === '/auth/api/restricted') return '/restricted/api/index.html'
const routes = { '': '/', host: '/host/index.html', admin: '/admin/', restricted: '/restricted/index.html', 'restricted-api': '/restricted-api/index.html' }
const routes = { '': '/', host: '/host/index.html', admin: '/admin/', 'restricted-forward': '/restricted/forward/index.html', 'restricted-api': '/restricted/api/index.html' }
for (const [path, target] of Object.entries(routes)) {
if ([`/auth/${path}`, `/auth/${path}/`, `/${path}`, `/${path}/`].includes(url)) return target
}
@@ -59,8 +60,8 @@ export default defineConfig(({ command }) => ({
index: resolve(__dirname, 'index.html'),
admin: resolve(__dirname, 'admin/index.html'),
reset: resolve(__dirname, 'reset/index.html'),
restricted: resolve(__dirname, 'restricted/index.html'),
'restricted-api': resolve(__dirname, 'restricted-api/index.html'),
'restricted-forward': resolve(__dirname, 'restricted/forward/index.html'),
'restricted-api': resolve(__dirname, 'restricted/api/index.html'),
host: resolve(__dirname, 'host/index.html')
}
}