We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71be71c commit 715759fCopy full SHA for 715759f
src/index.ts
@@ -45,6 +45,12 @@ Chunk.hashFunction = (data: Uint8Array): Uint8Array => {
45
method: request.method,
46
url: request.url,
47
}, 'Incoming request');
48
+
49
+ if (request.url !== '/upload' || request.method !== 'POST') {
50
+ response.writeHead(404, { 'Content-Type': 'application/json' });
51
+ response.end(JSON.stringify({ error: 'Not found' }));
52
+ return;
53
+ }
54
55
request.on('data', chunk => chunks.push(chunk))
56
0 commit comments