Skip to content

📈 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!

fixed Cannot GET /captcha-landing-page/light.html

Blue Moused95a92e9fd51
diff --git a/src/captcha-loader.ts b/src/captcha-loader.ts
index e84c156b2..7bb858608 100644
--- a/src/captcha-loader.ts
+++ b/src/captcha-loader.ts
@@ -1,6 +1,9 @@
+// @ts-ignore
+const isDevelopment = window.__SWETRIX_CAPTCHA_DEV || false
+
const CAPTCHA_SELECTOR = '.swecaptcha'
-const LIGHT_CAPTCHA_IFRAME_URL = './light.html'
-const DARK_CAPTCHA_IFRAME_URL = './dark.html'
+const LIGHT_CAPTCHA_IFRAME_URL = isDevelopment ? 'https://cap.swetrix.com/pages/light' : './light.html'
+const DARK_CAPTCHA_IFRAME_URL = isDevelopment ? 'https://cap.swetrix.com/pages/dark' : './dark.html'
const DEFAULT_RESPONSE_INPUT_NAME = 'swetrix-captcha-response'
const MESSAGE_IDENTIFIER = 'swetrix-captcha'
const ID_PREFIX = 'swetrix-captcha-'