mirror of
https://github.com/usememos/memos.git
synced 2024-12-27 15:42:51 +08:00
fix: apiv2 failed in container (#2307)
This commit is contained in:
parent
fbbfb11916
commit
5b6b2f0528
2 changed files with 5 additions and 3 deletions
|
@ -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",
|
||||
})
|
||||
|
|
|
@ -19,6 +19,10 @@ export default defineConfig({
|
|||
target: devProxyServer,
|
||||
xfwd: true,
|
||||
},
|
||||
"^/memos.api.v2": {
|
||||
target: devProxyServer,
|
||||
xfwd: true,
|
||||
},
|
||||
"^/o/": {
|
||||
target: devProxyServer,
|
||||
xfwd: true,
|
||||
|
|
Loading…
Reference in a new issue