get_web_url: forzar HTTP en forge + documentar ?pruebas=1 obligatorio
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,14 +20,20 @@ export function registerGetWebUrlTool(server) {
|
||||
};
|
||||
}
|
||||
|
||||
// Inside Docker, HTTPS is not available — force HTTP for internal requests
|
||||
let webUrl = credentials.web_url;
|
||||
if (webUrl && webUrl.startsWith("https://") && webUrl.includes(".forge.")) {
|
||||
webUrl = webUrl.replace("https://", "http://");
|
||||
}
|
||||
|
||||
return {
|
||||
content: [{
|
||||
type: "text",
|
||||
text: JSON.stringify({
|
||||
web_url: credentials.web_url,
|
||||
web_url: webUrl,
|
||||
api_web_url: credentials.api_web_url || null,
|
||||
website: credentials.website || null,
|
||||
note: "Always use web_url for Playwright/fetch. Never use the production domain directly.",
|
||||
note: "Always use web_url for Playwright/fetch. IMPORTANT: Always append ?pruebas=1 to any URL you visit (e.g. web_url + '/?pruebas=1' or web_url + '/servicios/?pruebas=1'). Never use the production domain directly.",
|
||||
})
|
||||
}],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user