mirror of
https://github.com/usememos/memos.git
synced 2025-04-13 09:02:09 +02:00
fix: apiv2 failed in container (#2307)
This commit is contained in:
parent
fbbfb11916
commit
5b6b2f0528
@ -5,10 +5,8 @@ import { SystemServiceDefinition } from "./types/proto/api/v2/system_service";
|
|||||||
import { TagServiceDefinition } from "./types/proto/api/v2/tag_service";
|
import { TagServiceDefinition } from "./types/proto/api/v2/tag_service";
|
||||||
import { UserServiceDefinition } from "./types/proto/api/v2/user_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(
|
const channel = createChannel(
|
||||||
address,
|
window.location.origin,
|
||||||
FetchTransport({
|
FetchTransport({
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
})
|
})
|
||||||
|
@ -19,6 +19,10 @@ export default defineConfig({
|
|||||||
target: devProxyServer,
|
target: devProxyServer,
|
||||||
xfwd: true,
|
xfwd: true,
|
||||||
},
|
},
|
||||||
|
"^/memos.api.v2": {
|
||||||
|
target: devProxyServer,
|
||||||
|
xfwd: true,
|
||||||
|
},
|
||||||
"^/o/": {
|
"^/o/": {
|
||||||
target: devProxyServer,
|
target: devProxyServer,
|
||||||
xfwd: true,
|
xfwd: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user