@clawos-dev/clawd 0.2.82-beta.153.5114ee6 → 0.2.83-beta.154.f874286
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/cli.cjs +8 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -27139,7 +27139,9 @@ function createHttpRouter(deps) {
|
|
|
27139
27139
|
return true;
|
|
27140
27140
|
}
|
|
27141
27141
|
if (url.pathname === "/healthz" && req.method === "GET") {
|
|
27142
|
-
sendJson(res, 200, { ok: true, version: deps.daemonVersion }
|
|
27142
|
+
sendJson(res, 200, { ok: true, version: deps.daemonVersion }, {
|
|
27143
|
+
"Access-Control-Allow-Origin": "*"
|
|
27144
|
+
});
|
|
27143
27145
|
return true;
|
|
27144
27146
|
}
|
|
27145
27147
|
if (!url.pathname.startsWith("/session/") && !url.pathname.startsWith("/files/")) {
|
|
@@ -27219,8 +27221,11 @@ function parseUrl(rawUrl) {
|
|
|
27219
27221
|
return null;
|
|
27220
27222
|
}
|
|
27221
27223
|
}
|
|
27222
|
-
function sendJson(res, status, body) {
|
|
27223
|
-
res.writeHead(status, {
|
|
27224
|
+
function sendJson(res, status, body, extraHeaders) {
|
|
27225
|
+
res.writeHead(status, {
|
|
27226
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
27227
|
+
...extraHeaders ?? {}
|
|
27228
|
+
});
|
|
27224
27229
|
res.end(JSON.stringify(body));
|
|
27225
27230
|
}
|
|
27226
27231
|
function withCtx(ctx, body) {
|
package/package.json
CHANGED