Skip to content

Commit

Permalink
fix(dashboard): autogen backend url
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotAmn committed Jan 16, 2025
1 parent 50cbcae commit 6541973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export class StaticVars {
}


const backend_url = process.env.REACT_APP_BACKEND_URL || "http://localhost:8080"
//const backend_url = process.env.REACT_APP_BACKEND_URL || "http://localhost:8080"
const current_domain = window.location.hostname;
const backend_url = process.env.NODE_ENV === 'development' ? "http://localhost:8080" : `https://${current_domain}`

const api = axios.create({
baseURL: `${backend_url}/api/`,
Expand Down

0 comments on commit 6541973

Please sign in to comment.