mcp-scraper 0.28.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/api-server.cjs
CHANGED
|
@@ -41193,7 +41193,7 @@ function propsValue(value) {
|
|
|
41193
41193
|
}
|
|
41194
41194
|
function cors(c) {
|
|
41195
41195
|
const origin = c.req.header("origin");
|
|
41196
|
-
const configured = (process.env.VAULT_APP_ALLOWED_ORIGINS ?? "https://
|
|
41196
|
+
const configured = (process.env.VAULT_APP_ALLOWED_ORIGINS ?? "https://mcpscraper.dev").split(",").map((value) => value.trim()).filter(Boolean);
|
|
41197
41197
|
const local = !!origin && /^http:\/\/localhost(?::\d+)?$/.test(origin);
|
|
41198
41198
|
if (origin && (configured.includes(origin) || local)) c.header("Access-Control-Allow-Origin", origin);
|
|
41199
41199
|
c.header("Vary", "Origin");
|
|
@@ -41316,12 +41316,6 @@ var init_vault_routes = __esm({
|
|
|
41316
41316
|
}, token);
|
|
41317
41317
|
return c.json(result, result.ok ? 200 : 502);
|
|
41318
41318
|
});
|
|
41319
|
-
vaultApp.get("/:token", (c) => {
|
|
41320
|
-
const token = c.req.param("token");
|
|
41321
|
-
if (!validToken(token)) return c.html('<!doctype html><html><body style="font-family:system-ui;padding:40px"><h2>This Vault App link is not valid.</h2><p>Ask the AI to run get-vault-app-link again, or revoke-vault-app-link and issue a replacement.</p></body></html>', 401);
|
|
41322
|
-
const base = (process.env.VAULT_APP_BASE_URL ?? "https://vault.mcpscraper.dev").replace(/\/$/, "");
|
|
41323
|
-
return c.redirect(`${base}/vault/${encodeURIComponent(token)}`, 302);
|
|
41324
|
-
});
|
|
41325
41319
|
}
|
|
41326
41320
|
});
|
|
41327
41321
|
|