Skip to content

Commit

Permalink
Merge pull request wandb#62 from wandb/fix/iframe
Browse files Browse the repository at this point in the history
Fix iframe for cases when running on a different host / IP
  • Loading branch information
vanpelt authored Apr 24, 2024
2 parents c0a2225 + 72514ee commit 3a8aac1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions frontend/src/components/HtmlAnnotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,8 @@ export default function HTMLAnnotator({
rendering,
imageUploadRef
}: HTMLAnnotatorProps) {
// code spaces and their fancy proxy as well as our hosted service use github pages
const iframeSrc =
import.meta.env.MODE === 'hosted' ||
document.location.hostname.endsWith('github.dev')
? 'https://wandb.github.io'
: 'http://127.0.0.1:7878'
// only point to our local annotator in development / running locally otherwise use github pages
const iframeSrc = document.location.hostname.includes("127.0.0.1") ? 'http://127.0.0.1:7878' : 'https://wandb.github.io'
const iframeRef = useRef<HTMLIFrameElement | null>(null)
const item = useAtomValue(historyAtomFamily({ id }))

Expand Down

0 comments on commit 3a8aac1

Please sign in to comment.