chore: initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { defineConfig, type ProxyOptions } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
const proxy: ProxyOptions = {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
configure(server) {
|
||||
server.on('proxyReq', request => {
|
||||
if (request.getHeader('origin')) request.setHeader('origin', 'http://127.0.0.1:8080')
|
||||
})
|
||||
},
|
||||
}
|
||||
export default defineConfig({ plugins: [react()], server: { proxy: { '/admin': proxy, '/v1': proxy } } })
|
||||
Reference in New Issue
Block a user