Skip to content

Commit c88b5ea

Browse files
committedDec 27, 2024··
Migrated to Nuxt 4 app structure
1 parent 2559225 commit c88b5ea

31 files changed

+56
-52
lines changed
 
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎frontend/nuxt.config.ts

+56-52
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,64 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
3-
devtools: {
4-
enabled: true
5-
},
3+
future: {
4+
compatibilityVersion: 4
5+
},
6+
7+
devtools: {
8+
enabled: true
9+
},
610

7-
modules: [
8-
'@nuxt/ui',
9-
// 'nuxt-security',
10-
'@nuxt-alt/auth'
11-
],
11+
modules: [
12+
'@nuxt/ui',
13+
// 'nuxt-security',
14+
'@nuxt-alt/auth'
15+
],
1216

13-
app: {
14-
head: {
15-
title: 'MailGuardian',
16-
bodyAttrs: {
17-
class: 'bg-slate-100'
18-
}
19-
}
20-
},
17+
app: {
18+
head: {
19+
title: 'MailGuardian',
20+
bodyAttrs: {
21+
class: 'bg-slate-100'
22+
}
23+
}
24+
},
2125

22-
auth: {
23-
strategies: {
24-
local: {
25-
url: `${process.env.SERVER_HOST}/api/v2`,
26-
token: {
27-
property: 'access_token',
28-
global: true,
29-
required: true,
30-
name: 'Authorization',
31-
type: 'Bearer',
32-
httpOnly: true
33-
},
34-
user: {
35-
property: false,
36-
autoFetch: true
37-
},
38-
endpoints: {
39-
login: { url: `${process.env.SERVER_HOST}/api/v2/auth/token`, method: 'post' },
40-
logout: false,
41-
user: { url: `${process.env.SERVER_HOST}/api/v2/auth/whoami`, method: 'get' }
42-
}
43-
}
44-
},
45-
globalMiddleware: true,
46-
redirect: {
47-
login: '/login',
48-
logout: '/login',
49-
home: '/'
50-
}
51-
},
26+
auth: {
27+
strategies: {
28+
local: {
29+
url: `${process.env.SERVER_HOST}/api/v2`,
30+
token: {
31+
property: 'access_token',
32+
global: true,
33+
required: true,
34+
name: 'Authorization',
35+
type: 'Bearer',
36+
httpOnly: true
37+
},
38+
user: {
39+
property: false,
40+
autoFetch: true
41+
},
42+
endpoints: {
43+
login: { url: `${process.env.SERVER_HOST}/api/v2/auth/token`, method: 'post' },
44+
logout: false,
45+
user: { url: `${process.env.SERVER_HOST}/api/v2/auth/whoami`, method: 'get' }
46+
}
47+
}
48+
},
49+
globalMiddleware: true,
50+
redirect: {
51+
login: '/login',
52+
logout: '/login',
53+
home: '/'
54+
}
55+
},
5256

53-
runtimeConfig: {
54-
public: {
55-
apiBaseUrl: `${process.env.SERVER_HOST}/api/v2`
56-
}
57-
},
57+
runtimeConfig: {
58+
public: {
59+
apiBaseUrl: `${process.env.SERVER_HOST}/api/v2`
60+
}
61+
},
5862

59-
compatibilityDate: '2024-08-15'
63+
compatibilityDate: '2024-08-15'
6064
})

0 commit comments

Comments
 (0)
Please sign in to comment.