Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix: env var access in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Nov 21, 2022
1 parent 85cd86a commit 37e1504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/composables/useKirbyApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getApiUrl(path) {
// Use language path in multi-language setup as base
isMultilang ? `/${languageCode}` : "/",
// Add the API path
import.meta.env.VITE_BACKEND_API_SLUG,
import.meta.env.KIRBY_CONTENT_API_SLUG,
// Add the file path
path
);
Expand Down
4 changes: 3 additions & 1 deletion src/modules/kirbytext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
let router;
const origin = import.meta.env.DEV
? `${process.env.KIRBY_DEV_PROTOCOL}://${process.env.KIRBY_DEV_HOSTNAME}:${process.env.KIRBY_DEV_PORT}`
? `${import.meta.env.KIRBY_DEV_PROTOCOL}://${
import.meta.env.KIRBY_DEV_HOSTNAME
}:${import.meta.env.KIRBY_DEV_PORT}`
: window.location.origin;

/**
Expand Down

0 comments on commit 37e1504

Please sign in to comment.