mirror of
https://github.com/usememos/memos.git
synced 2025-03-04 01:04:38 +08:00
refactor: declare variable for devProxyServer (#1220)
This commit is contained in:
parent
e43e04b478
commit
71de6613d3
1 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,8 @@ import { resolve } from "path";
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
|
||||
const devProxyServer = "http://localhost:8081/";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
|
@ -10,19 +12,19 @@ export default defineConfig({
|
|||
port: 3001,
|
||||
proxy: {
|
||||
"^/api": {
|
||||
target: "http://localhost:8081/",
|
||||
target: devProxyServer,
|
||||
changeOrigin: true,
|
||||
},
|
||||
"^/o/": {
|
||||
target: "http://localhost:8081/",
|
||||
target: devProxyServer,
|
||||
changeOrigin: true,
|
||||
},
|
||||
"^/u/\\d*/rss.xml": {
|
||||
target: "http://localhost:8081/",
|
||||
target: devProxyServer,
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/explore/rss.xml": {
|
||||
target: "http://localhost:8081/",
|
||||
target: devProxyServer,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue