fix: apiv2 failed in container (#2307)

This commit is contained in:
Athurg Gooth 2023-09-28 18:45:45 +08:00 committed by GitHub
parent fbbfb11916
commit 5b6b2f0528
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -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",
})

View file

@ -19,6 +19,10 @@ export default defineConfig({
target: devProxyServer,
xfwd: true,
},
"^/memos.api.v2": {
target: devProxyServer,
xfwd: true,
},
"^/o/": {
target: devProxyServer,
xfwd: true,