-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
75 lines (67 loc) · 1.86 KB
/
nuxt.config.ts
File metadata and controls
75 lines (67 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// https://nuxt.com/docs/api/configuration/nuxt-config
export default {
typescript: {
// This ignores errors on build too.
typeCheck: false
},
runtimeConfig: {
public: {
facebookClientId: process.env.FACEBOOK_CLIENT_ID || '',
facebookLoginRedirect: `${process.env.BASE_URL}/api/fb-login/callback` || '',
baseUrl: process.env.BASE_URL || '',
},
facebookClientSecret: process.env.FACEBOOK_CLIENT_SECRET || '',
},
modules: ['nuxt-security', '@artmizu/nuxt-prometheus'],
pages: true,
// See https://nuxt-security.vercel.app/getting-started/quick-start for info on security.
security: {
rateLimiter: {
value: {
tokensPerInterval: process.dev ? 999999 : 30,
interval: "hour",
fireImmediately: false
},
route: '',
throwError: false, // optional
},
requestSizeLimiter: {
value: {
maxRequestSizeInBytes: 8000, // Most browsers have a request limit of 8KB, but this is to be safe.
maxUploadFileRequestInBytes: 1000000,
},
route: '',
throwError: false // optional,
},
allowedMethodsRestricter: {
value: [
'GET',
// 'POST', // To resolve HTTP 405 errors and allow POST requests to hit the scrape endpoints (at time of writing this would allow anyone to trigger an Instagram scrape, using API rate limit time!), uncomment this line
],
route: '',
},
corsHandler: {
value: {
origin: '*',
methods: '*',
},
route: ''
},
// Uncomment this to make nuxt devtools work (idk why this is required, i don't like it!)
// headers: {
// contentSecurityPolicy: {
// 'script-src': ["'nonce-{{nonce}}'", "'strict-dynamic'"],
// },
// // 2.
// crossOriginEmbedderPolicy: false,
// },
},
css: ['vue-final-modal/style.css'],
compatibilityDate: '2025-01-14',
ssr: true,
nitro: {
routeRules: {
'/api/events/': { cache: { swr: true, maxAge: 60, staleMaxAge: 60 } }
},
}
}