diff --git a/.gitignore b/.gitignore index e0338e5..a6ee4c2 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ site cache public/world.json .dev.* +.kiro/steering/locale.md diff --git a/docs/configuration.md b/docs/configuration.md index 2112df5..87e9e81 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -61,3 +61,7 @@ Set the maximum query data volume for the Metric list. ## `NUXT_DISABLE_BOT_ACCESS_LOG` Access statistics do not count bot traffic. + +## `NUXT_API_CORS` + +Set the environment variable `NUXT_API_CORS=true` during build to enable CORS support for the API. diff --git a/nuxt.config.ts b/nuxt.config.ts index d10682b..487e438 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -50,6 +50,9 @@ export default defineNuxtConfig({ '/dashboard': { redirect: '/dashboard/links', }, + '/api/**': { + cors: process.env.NUXT_API_CORS === 'true', + }, }, future: { @@ -60,10 +63,6 @@ export default defineNuxtConfig({ enforceModuleCompatibility: true, }, - compatibilityDate: { - cloudflare: '2025-05-08', - }, - nitro: { experimental: { openAPI: true,