(req, res, status, body)
| 57 | }; |
| 58 | |
| 59 | const json = (req, res, status, body) => { |
| 60 | res.writeHead(status, { |
| 61 | "content-type": "application/json", |
| 62 | "cache-control": "no-store", |
| 63 | ...corsFor(req), |
| 64 | }); |
| 65 | res.end(JSON.stringify(body)); |
| 66 | }; |
| 67 | |
| 68 | const compressedJson = (req, res, body) => { |
| 69 | const zipped = gzipSync(JSON.stringify(body)); |