fix: iframe probe accepts only 2xx (reject portal 404 with X-Frame-Options)
This commit is contained in:
+1
-1
@@ -1688,7 +1688,7 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re
|
||||
if (data.ready) {{
|
||||
try {{
|
||||
const probe = await fetch(iframeSrc, {{method:'HEAD', credentials:'include'}});
|
||||
if (probe.status < 500) {{
|
||||
if (probe.status >= 200 && probe.status < 300) {{
|
||||
const f = document.getElementById('app-frame');
|
||||
f.src = iframeSrc;
|
||||
f.style.display = '';
|
||||
|
||||
Reference in New Issue
Block a user