Closed NoriFe closed 1 year ago
In principle this shouldn't result in a CORB block so this might be an issue with Chromium, but you also haven't provided a lot of details. What is requesting this resource and from where?
Thank you I have sorted it. Was the wrong path. Thank you for your time annevk
Hi guys having a problem with my website which I would like to upload to GitHub, I managed to make sure it will fetch files as .js .css etc but now CORB is in action and I cant go round it... any advice?
that the error: Cross-Origin Read Blocking (CORB) blocked cross-origin response https://raw.githubusercontent.com/NoriFe/Portfolio/main/index.js with MIME type text/plain. See https://www.chromestatus.com/feature/5629709824032768 for more details.
my js file: const mime = require('mime'); const http = require('http'); const fs = require('fs');
http.createServer((req, res) => { const filePath = 'index.js'; const mimeType = mime.getType(filePath);
res.setHeader('Content-Type', mimeType);
fs.readFile(filePath, (err, data) => { if (err) { // Handle error res.statusCode = 500; res.end('Internal Server Error'); return; }
}); }).listen(3000, () => { console.log('Server is running on port 3000'); });