📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
using API_URL from consig for selfhosted only
Blue Mouseca8c93ebbe6a
diff --git a/src/api/index.js b/src/api/index.jsindex e41719fc4..04a33592b 100644--- a/src/api/index.js+++ b/src/api/index.js@@ -7,11 +7,12 @@ import { authActions } from 'redux/actions/auth'import { getAccessToken, removeAccessToken } from 'utils/accessToken'import config from '../config.json'+import { isSelfhosted } from 'redux/constants'const debug = Debug('swetrix:api')const api = axios.create({- baseURL: process.env.REACT_APP_API_URL || config.API_URL,+ baseURL: isSelfhosted ? config.API_URL : process.env.REACT_APP_API_URL,})api.interceptors.request.use(