feat: toggle Sentry and API url when loading site from localhost
This commit is contained in:
parent
621272c842
commit
01f76c77f0
@ -1,7 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
|
||||
const baseUrl = () => localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me";
|
||||
const baseUrl = () => window.location.origin.includes("localhost") ? "http://localhost:5000" : localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me";
|
||||
|
||||
const methods = ['get', 'post', 'delete', 'patch', 'put'];
|
||||
const noop = () => {};
|
||||
|
@ -5,7 +5,7 @@ Sentry.init({
|
||||
dsn: "https://58109fec589f4c2bbfa190329acf679a@sentry.pluralkit.me/4",
|
||||
integrations: [new Integrations.BrowserTracing()],
|
||||
|
||||
enabled: true,
|
||||
enabled: !window.location.origin.includes("localhost"),
|
||||
debug: false,
|
||||
release: "dev",
|
||||
// Set tracesSampleRate to 1.0 to capture 100%
|
||||
|
Loading…
Reference in New Issue
Block a user