mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-10-08 03:53:22 +00:00
feat(router): extend all routes to be accessed by /index.html
This commit is contained in:
parent
7d3d48e470
commit
e37bd06594
@ -1,5 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
import type { NuxtConfig } from '@nuxt/types';
|
||||
import { NuxtRouteConfig } from '@nuxt/types/config/router';
|
||||
|
||||
const config: NuxtConfig = {
|
||||
/*
|
||||
@ -128,7 +129,17 @@ const config: NuxtConfig = {
|
||||
** Router configuration
|
||||
*/
|
||||
router: {
|
||||
middleware: ['auth']
|
||||
middleware: ['auth'],
|
||||
extendRoutes(routes: NuxtRouteConfig[]): void {
|
||||
// Extend all routes to be accessed by /index.html
|
||||
for (const route of routes) {
|
||||
if (route.path.slice(-1) === '/') {
|
||||
route.alias = route.path + 'index.html';
|
||||
} else {
|
||||
route.alias = route.path + '/index.html';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/*
|
||||
** Axios module configuration
|
||||
|
Loading…
Reference in New Issue
Block a user