Unverified Commit 71de6613 authored by 远浅's avatar 远浅 Committed by GitHub

refactor: declare variable for devProxyServer (#1220)

parent e43e04b4
......@@ -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,
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment