← back to Yolo Agent
add creds-in-URL fetch guard to gated pages (TK-10984)
aaada7aa4c273acf02bc2058a7e5d6bf97939e01 · 2026-08-30 22:58:53 -0700 · Steve Abrams
Files touched
Diff
commit aaada7aa4c273acf02bc2058a7e5d6bf97939e01
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Aug 30 22:58:53 2026 -0700
add creds-in-URL fetch guard to gated pages (TK-10984)
---
live-dashboard.html | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/live-dashboard.html b/live-dashboard.html
index fdad103..a9dd9f2 100644
--- a/live-dashboard.html
+++ b/live-dashboard.html
@@ -1,5 +1,30 @@
<!DOCTYPE html>
-<html><head><meta charset="utf-8"><title>YOLO Live Tasks</title>
+<html><head>
+<script>
+// Credential-safe fetch guard (fleet drop-in) — if this page is opened with
+// credentials in the URL (a saved bookmark / Chrome-remembered basic-auth:
+// https://user:pass@host/…), the browser poisons document.baseURI, so any
+// relative or root-relative fetch('/api/…') throws "Request cannot be constructed
+// from a URL that includes credentials" and callers silently fall to an empty
+// state. Resolve every non-absolute request URL against the credential-free
+// location instead of baseURI. Placed first so it wraps window.fetch before any
+// app script runs. Ref: creds-in-url-fetch-guard-fleet-pattern.
+(function () {
+ var _fetch = window.fetch.bind(window);
+ var cleanBase = function () { return location.origin + location.pathname; };
+ window.fetch = function (input, init) {
+ try {
+ if (typeof input === 'string' && !/^[a-z]+:\/\//i.test(input) && input.indexOf('//') !== 0) {
+ input = new URL(input, cleanBase()).href;
+ } else if (input instanceof Request && !/^[a-z]+:\/\//i.test(input.url)) {
+ input = new Request(new URL(input.url, cleanBase()).href, input);
+ }
+ } catch (_) { /* fall through to native */ }
+ return _fetch(input, init);
+ };
+})();
+</script>
+<meta charset="utf-8"><title>YOLO Live Tasks</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
*{margin:0;padding:0;box-sizing:border-box}
← 2b7ab10 chore: macstudio3 migration — reconcile from mac2 + repoint
·
back to Yolo Agent
·
add .deploy.conf (data-excluded) for guard deploy (TK-10984) 12fd929 →