(body: unknown, status = 200)
| 42 | } |
| 43 | |
| 44 | function json(body: unknown, status = 200) { |
| 45 | return new Response(JSON.stringify(body), { |
| 46 | status, |
| 47 | headers: { |
| 48 | 'Content-Type': 'application/json; charset=utf-8', |
| 49 | 'Cache-Control': 'no-store', |
| 50 | }, |
| 51 | }); |
| 52 | } |
| 53 | |
| 54 | function safeResolve(urlPath: string) { |
| 55 | const relativePath = urlPath.replace(/^\/artifacts/, ''); |