@odla-ai/chapter 0.47.9 → 0.47.10

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.
@@ -1847,6 +1847,22 @@ async function notifyAdminOfApplication(db, env, chapterId, applicationId, field
1847
1847
  }
1848
1848
  }
1849
1849
 
1850
+ // src/worker-routes-health.ts
1851
+ var handleHealth = async (_req, url, env, ctx) => {
1852
+ if (url.pathname !== "/api/health") return null;
1853
+ const response = json({ ok: true });
1854
+ response.headers.set("cache-control", "no-store");
1855
+ for (const [name, value] of Object.entries({
1856
+ "x-odla-app-id": env.ODLA_APP_ID,
1857
+ "x-odla-chapter-id": ctx.chapter.id,
1858
+ "x-odla-data-environment": env.ODLA_ENV,
1859
+ "x-odla-runtime": env.ODLA_RUNTIME || "default"
1860
+ })) {
1861
+ if (typeof value === "string" && /^[a-z0-9][a-z0-9-]{0,62}$/.test(value)) response.headers.set(name, value);
1862
+ }
1863
+ return response;
1864
+ };
1865
+
1850
1866
  // src/worker-routes.ts
1851
1867
  async function memberSessionApplication(db, chapterId, identity) {
1852
1868
  let apps = (await db.query({ applications: { $: {
@@ -1870,7 +1886,6 @@ async function memberSessionApplication(db, chapterId, identity) {
1870
1886
  source: app
1871
1887
  };
1872
1888
  }
1873
- var handleHealth = async (_req, url) => url.pathname === "/api/health" ? json({ ok: true }) : null;
1874
1889
  var handleConfig = async (_req, url, env, ctx) => {
1875
1890
  if (url.pathname !== "/api/config") return null;
1876
1891
  try {