Skip to content

Commit

Permalink
Update environment variable handling to remove VITE_IS_HOST and utili…
Browse files Browse the repository at this point in the history
…ze VITE_PANEL_DOMAIN in URL adjustments
  • Loading branch information
MatinDehghanian committed Dec 7, 2024
1 parent 323a4df commit 6b20495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ VITE_JSON_APPS_URL=https://raw.githubusercontent.com/MatinDehghanian/public-asse

### Host Settings
# Host URL
VITE_PANEL_DOMAIN=https://panel.example.com:8000
# Is Host
VITE_IS_HOST=false
VITE_PANEL_DOMAIN=https://panel.example.com:8000
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function App() {


const getAdjustedUrl = (subURL) => {
if (import.meta.env.VITE_IS_HOST) {
if (import.meta.env.VITE_PANEL_DOMAIN) {
return subURL.replace(
/https?:\/\/[^/]+/,
import.meta.env.VITE_PANEL_DOMAIN
Expand Down

0 comments on commit 6b20495

Please sign in to comment.