mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
fix: proxy auth in vite.config.js
This commit is contained in:
parent
15ada95249
commit
4a95b30a0d
1 changed files with 15 additions and 11 deletions
|
|
@ -1,29 +1,33 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from 'vite';
|
||||||
import react from "@vitejs/plugin-react";
|
import react from '@vitejs/plugin-react';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
host: "localhost",
|
host: 'localhost',
|
||||||
port: 3090,
|
port: 3090,
|
||||||
strictPort: false,
|
strictPort: false,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
'/api': {
|
||||||
target: "http://localhost:3080",
|
target: 'http://localhost:3080',
|
||||||
changeOrigin: true,
|
changeOrigin: true
|
||||||
|
},
|
||||||
|
'/auth': {
|
||||||
|
target: 'http://localhost:3080',
|
||||||
|
changeOrigin: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
publicDir: "./public",
|
publicDir: './public',
|
||||||
build: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: "./dist",
|
outDir: './dist'
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"~": path.join(__dirname, "src/"),
|
'~': path.join(__dirname, 'src/')
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue