MCPcopy Create free account
hub / github.com/Forward-Future/loopy / assertConfigured

Function assertConfigured

loop-library/worker/src/index.js:385–402  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

383}
384
385function assertConfigured(env) {
386 for (const name of [
387 "FORM_GUARD",
388 "HERENOW_API_KEY",
389 "HERENOW_SITE_SLUG",
390 "TURNSTILE_RATE_LIMITER",
391 "TURNSTILE_HOSTNAMES",
392 "TURNSTILE_SECRET_KEY",
393 ]) {
394 if (!env[name]) {
395 throw new RequestError(
396 503,
397 "gateway_not_configured",
398 "Form protection is temporarily unavailable.",
399 );
400 }
401 }
402}
403
404async function readJsonBody(request) {
405 const contentType = request.headers.get("Content-Type") || "";

Callers 1

handleRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected