(domain: string, db: Database, env: Env)
| 11 | } |
| 12 | |
| 13 | export async function handleRequest(domain: string, db: Database, env: Env) { |
| 14 | const headers = { |
| 15 | ...cors(), |
| 16 | 'content-type': 'application/json; charset=utf-8', |
| 17 | } |
| 18 | |
| 19 | const res: InstanceConfigV2 = { |
| 20 | domain, |
| 21 | title: env.INSTANCE_TITLE, |
| 22 | version: getVersion(), |
| 23 | source_url: 'https://github.com/cloudflare/wildebeest', |
| 24 | description: env.INSTANCE_DESCR, |
| 25 | thumbnail: { |
| 26 | url: DEFAULT_THUMBNAIL, |
| 27 | }, |
| 28 | languages: ['en'], |
| 29 | registrations: { |
| 30 | // Registration is disabled because unsupported by Wildebeest. Users |
| 31 | // should go through the login flow and authenticate with Access. |
| 32 | enabled: false, |
| 33 | }, |
| 34 | contact: { |
| 35 | email: env.ADMIN_EMAIL, |
| 36 | }, |
| 37 | rules: [], |
| 38 | } |
| 39 | |
| 40 | return new Response(JSON.stringify(res), { headers }) |
| 41 | } |
no test coverage detected