- Add Nitro devProxy for local proxying of api/v1 and uploads to the backend server - Improve useApiFetch to dynamically clear auth state and navigate to login on 401/403 errors - Automatically strip Content-Type headers for multipart FormData upload request bodies - Add css rule to fix Bootstrap Italia navbar link border display - Add ts-expect-error tag to avoid type checking issues with bootstrap-italia bundle loading
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
export default defineNuxtConfig({
|
|
compatibilityDate: '2025-07-15',
|
|
devtools: { enabled: true },
|
|
modules: [
|
|
'@nuxt/icon',
|
|
'@nuxt/image',
|
|
'@nuxt/fonts',
|
|
'@nuxtjs/sitemap',
|
|
'@nuxtjs/robots'
|
|
],
|
|
|
|
runtimeConfig: {
|
|
public: {
|
|
url: 'http://localhost:3000',
|
|
api: 'http://localhost:5555',
|
|
}
|
|
},
|
|
|
|
site: {
|
|
url: 'http://localhost:3000',
|
|
name: 'Visione - Un\'occhio per la sicurezza del cittadino.',
|
|
},
|
|
|
|
nitro: {
|
|
devProxy: {
|
|
'/api/v1': {
|
|
target: 'https://bk.visione.studentindipendenti.it/api/v1',
|
|
changeOrigin: true,
|
|
headers: {
|
|
host: 'bk.visione.studentindipendenti.it',
|
|
origin: 'https://visione.studentindipendenti.it',
|
|
referer: 'https://visione.studentindipendenti.it/'
|
|
}
|
|
},
|
|
'/uploads': {
|
|
target: 'https://bk.visione.studentindipendenti.it/uploads',
|
|
changeOrigin: true,
|
|
headers: {
|
|
host: 'bk.visione.studentindipendenti.it',
|
|
origin: 'https://visione.studentindipendenti.it',
|
|
referer: 'https://visione.studentindipendenti.it/'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
css: [
|
|
'@/assets/css/style.css',
|
|
'bootstrap-italia/dist/css/bootstrap-italia.min.css'
|
|
],
|
|
|
|
fonts: {
|
|
families: [
|
|
{ name: 'Lora', provider: 'google' },
|
|
{ name: 'Roboto Mono', provider: 'google' },
|
|
{ name: 'Titillium Web', provider: 'google' }
|
|
]
|
|
}
|
|
}) |