MCPcopy Create free account
hub / github.com/Sandpack/nodebox-runtime / setHeaders

Function setHeaders

tests/setup/runTestServer.ts:35–43  ·  view source on GitHub ↗
(res, filePath)

Source from the content-addressed store, hash-verified

33 root: path.join(__dirname, 'projects'),
34 decorateReply: false,
35 setHeaders(res, filePath) {
36 const parsedPath = path.parse(filePath);
37
38 if (parsedPath.ext === '.gz') {
39 res.setHeader('Content-Encoding', 'gzip');
40 } else if (parsedPath.ext === '.br') {
41 res.setHeader('Content-Encoding', 'br');
42 }
43 },
44 });
45
46 // Serve Msgpack to unpack project files on runtime.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected