mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
fix: restore token in /health for localhost extension auth
The CSO security fix stripped the token from /health to prevent leaking when tunneled. But the extension needs it to authenticate on localhost. Now returns token only when not tunneled (safe: localhost-only path). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1290,7 +1290,9 @@ async function start() {
|
||||
};
|
||||
// Sensitive fields only served on localhost (not through tunnel).
|
||||
// currentUrl reveals internal URLs, currentMessage reveals user intent.
|
||||
// token needed by extension to authenticate subsequent requests.
|
||||
if (!tunnelActive) {
|
||||
healthResponse.token = AUTH_TOKEN;
|
||||
healthResponse.currentUrl = browserManager.getCurrentUrl();
|
||||
healthResponse.chatEnabled = true;
|
||||
healthResponse.agent = {
|
||||
|
||||
Reference in New Issue
Block a user