Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: apiv2 failed in container (#2307)

Athurg Gooth5b6b2f052868
diff --git a/web/src/grpcweb.ts b/web/src/grpcweb.ts
index 9e9206774..347782fb6 100644
--- a/web/src/grpcweb.ts
+++ b/web/src/grpcweb.ts
@@ -5,10 +5,8 @@ import { SystemServiceDefinition } from "./types/proto/api/v2/system_service";
import { TagServiceDefinition } from "./types/proto/api/v2/tag_service";
import { UserServiceDefinition } from "./types/proto/api/v2/user_service";
-const address = import.meta.env.MODE === "development" ? "http://localhost:8081" : window.location.origin;
-
const channel = createChannel(
- address,
+ window.location.origin,
FetchTransport({
credentials: "include",
})
diff --git a/web/vite.config.ts b/web/vite.config.ts
index d92719d99..791a1f931 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -19,6 +19,10 @@ export default defineConfig({
target: devProxyServer,
xfwd: true,
},
+ "^/memos.api.v2": {
+ target: devProxyServer,
+ xfwd: true,
+ },
"^/o/": {
target: devProxyServer,
xfwd: true,