mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-22 16:23:18 +01:00
Fix missing subdirectory support - Fixes #262
This commit is contained in:
parent
e3ded669ca
commit
5fd7f43968
2
resources/js/router/index.js
vendored
2
resources/js/router/index.js
vendored
@ -12,7 +12,7 @@ import noRegistration from './middlewares/noRegistration'
|
||||
import setReturnTo from './middlewares/setReturnTo'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory('/'),
|
||||
history: createWebHistory(window.appConfig.subdirectory ? window.appConfig.subdirectory : '/'),
|
||||
routes: [
|
||||
{ path: '/start', name: 'start', component: () => import('../views/Start.vue'), meta: { middlewares: [authGuard, setReturnTo], watchedByKicker: true } },
|
||||
{ path: '/capture', name: 'capture', component: () => import('../views/twofaccounts/Capture.vue'), meta: { middlewares: [authGuard, setReturnTo], watchedByKicker: true } },
|
||||
|
5
resources/js/services/httpClientFactory.js
vendored
5
resources/js/services/httpClientFactory.js
vendored
@ -4,11 +4,12 @@ import { useNotifyStore } from '@/stores/notify'
|
||||
|
||||
export const httpClientFactory = (endpoint = 'api') => {
|
||||
let baseURL
|
||||
const subdir = window.appConfig.subdirectory
|
||||
|
||||
if (endpoint === 'web') {
|
||||
baseURL = '/'
|
||||
baseURL = subdir + '/'
|
||||
} else {
|
||||
baseURL = '/api/v1'
|
||||
baseURL = subdir + '/api/v1'
|
||||
}
|
||||
|
||||
const httpClient = axios.create({
|
||||
|
2
resources/views/landing.blade.php
vendored
2
resources/views/landing.blade.php
vendored
@ -15,7 +15,7 @@
|
||||
<link rel="icon" type="image/png" href="{{ asset('favicon.png') }}" />
|
||||
<link rel="apple-touch-icon" href="{{ asset('favicon_lg.png') }}" />
|
||||
<link rel="apple-touch-icon-precomposed" href="{{ asset('favicon_lg.png') }}" />
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="manifest" href="{{ asset('manifest.json') }}">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
3
vite.config.js
vendored
3
vite.config.js
vendored
@ -5,7 +5,10 @@ import i18n from 'laravel-vue-i18n/vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import version from './vite.version'
|
||||
|
||||
const ASSET_URL = process.env.ASSET_URL || ''
|
||||
|
||||
export default defineConfig({
|
||||
base: `${ASSET_URL}`,
|
||||
plugins: [
|
||||
laravel([
|
||||
'resources/js/app.js',
|
||||
|
Loading…
Reference in New Issue
Block a user