1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-25 08:09:41 +02:00

properly support subroutes

This commit is contained in:
hay-kot 2021-08-08 14:10:32 -08:00
parent fcee79a3e7
commit da425c970e
3 changed files with 47 additions and 8 deletions

View file

@ -196,12 +196,24 @@ export default {
publicRuntimeConfig: {
GLOBAL_MIDDLEWARE: process.env.GLOBAL_MIDDLEWARE || null,
ALLOW_SIGNUP: process.env.ALLOW_SIGNUP || true,
axios: {
browserBaseURL: process.env.SUB_PATH || "",
},
},
privateRuntimeConfig: {},
proxy: {
// "http://localhost:9000/*/api",
// See Proxy section
"/api/": {
[`${process.env.SUB_PATH}api`]: {
pathRewrite: {
[`${process.env.SUB_PATH}api`]: "/api", // rewrite path
},
changeOrigin: true,
target: process.env.API_URL || "http://localhost:9000",
},
"/api": {
changeOrigin: true,
target: process.env.API_URL || "http://localhost:9000",
},