Эх сурвалжийг харах

Update proxy server to make auth work

Lee Morgan 3 долоо хоног өмнө
parent
commit
1a3fada7e7
1 өөрчлөгдсөн 10 нэмэгдсэн , 1 устгасан
  1. 10 1
      vite.config.js

+ 10 - 1
vite.config.js

@@ -16,5 +16,14 @@ export default defineConfig({
 			// See https://svelte.dev/docs/kit/adapters for more information about adapters.
 			adapter: adapter()
 		})
-	]
+	],
+    server: {
+        proxy: {
+            "/api": {
+                target: "https://chatrpgapi.leemorgan.dev",
+                changeOrigin: true,
+                rewrite: (path) => path.replace(/^\/api/, "")
+            }
+        }
+    }
 });