Skip to content

Commit 37e1504

Browse files
fix: env var access in frontend
1 parent 85cd86a commit 37e1504

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/composables/useKirbyApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function getApiUrl(path) {
1616
// Use language path in multi-language setup as base
1717
isMultilang ? `/${languageCode}` : "/",
1818
// Add the API path
19-
import.meta.env.VITE_BACKEND_API_SLUG,
19+
import.meta.env.KIRBY_CONTENT_API_SLUG,
2020
// Add the file path
2121
path
2222
);

src/modules/kirbytext.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
let router;
22
const origin = import.meta.env.DEV
3-
? `${process.env.KIRBY_DEV_PROTOCOL}://${process.env.KIRBY_DEV_HOSTNAME}:${process.env.KIRBY_DEV_PORT}`
3+
? `${import.meta.env.KIRBY_DEV_PROTOCOL}://${
4+
import.meta.env.KIRBY_DEV_HOSTNAME
5+
}:${import.meta.env.KIRBY_DEV_PORT}`
46
: window.location.origin;
57

68
/**

0 commit comments

Comments
 (0)