Skip to content

Commit 9ad8ad0

Browse files
committed
Switch chat iframe between local and production
1 parent 7792220 commit 9ad8ad0

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

index.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ <h2>Career Chat</h2>
6464

6565
<div class="chat-embed">
6666
<iframe
67+
id="career-chat-frame"
6768
title="Career Chat"
68-
src="https://max8hugs-careerai.hf.space"
69+
src="about:blank"
6970
loading="lazy"
7071
referrerpolicy="no-referrer"
7172
></iframe>
@@ -175,5 +176,20 @@ <h3>Website Source</h3>
175176
</p>
176177
<p class="muted">Last updated Feb 13, 2026</p>
177178
</footer>
179+
<script>
180+
(() => {
181+
const localUrl = "http://127.0.0.1:7860";
182+
const prodUrl = "https://max8hugs-careerai.hf.space";
183+
const hostname = window.location.hostname;
184+
const isLocal =
185+
hostname === "127.0.0.1" ||
186+
hostname === "localhost" ||
187+
hostname === "";
188+
const configuredUrl = window.CAREER_CHAT_URL;
189+
const iframe = document.getElementById("career-chat-frame");
190+
if (!iframe) return;
191+
iframe.src = configuredUrl || (isLocal ? localUrl : prodUrl);
192+
})();
193+
</script>
178194
</body>
179195
</html>

0 commit comments

Comments
 (0)