-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
48 lines (48 loc) · 1.31 KB
/
nuxt.config.ts
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2025-04-09",
devtools: { enabled: false },
modules: ["@nuxtjs/sitemap", "nuxt-cron"],
ssr: true,
runtimeConfig: {
pasetoKey: process.env.NUXT_PASETO_KEY,
githubClientId: process.env.NUXT_GITHUB_CLIENT_ID,
githubClientSecret: process.env.NUXT_GITHUB_CLIENT_SECRET,
githubRedirectUri: process.env.NUXT_GITHUB_REDIRECT_URI,
corsOrigin: process.env.NUXT_HOST || "same-origin",
disableRegistering: process.env.NUXT_DISABLE_REGISTRATION,
},
nitro: {
preset: "bun",
},
app: {
head: {
charset: "utf-8",
viewport:
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",
title: "Ziit",
},
},
cron: {
runOnInit: true,
timeZone: "UTC+0",
jobsDir: "cron",
},
routeRules: {
"/api/**": {
cors: true,
headers: {
"Access-Control-Allow-Methods": "GET,POST",
"Access-Control-Allow-Origin": "{{ runtimeConfig.corsOrigin }}",
},
},
"/api/external/**": {
cors: true,
headers: {
"Access-Control-Allow-Methods": "POST",
"Access-Control-Allow-Origin": "vscode-webview://*",
"Access-Control-Allow-Headers": "authorization,content-type",
},
},
},
});