toolshed/frontend/vite.config.js
2023-05-10 23:28:55 +02:00

28 lines
811 B
JavaScript

import {fileURLToPath, URL} from 'node:url'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
host: true,
cors: true,
headers: {
//allow all origins
//'Access-Control-Allow-Origin': 'http://10.23.42.128:8000, http://10.23.42.168:8000',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token, Authorization, Accept,charset,boundary,Content-Length',
'Access-Control-Allow-Credentials': 'true'
}
}
})