favicon & MIME type
This commit is contained in:
parent
ecdcd7e545
commit
f231daf4e9
2 changed files with 4 additions and 0 deletions
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
|
@ -99,6 +99,10 @@ var server = http.createServer(option, function(req, res){
|
||||||
}
|
}
|
||||||
if(filename.endsWith('.js'))
|
if(filename.endsWith('.js'))
|
||||||
res.writeHead(200, {'Content-Type': 'text/javascript'});
|
res.writeHead(200, {'Content-Type': 'text/javascript'});
|
||||||
|
else if(filename.endsWith('.png'))
|
||||||
|
res.writeHead(200, {'Content-Type': 'image/png'});
|
||||||
|
else if(filename.endsWith('.ico'))
|
||||||
|
res.writeHead(200, {'Content-Type': 'image/ico'});
|
||||||
else
|
else
|
||||||
res.writeHead(200, {'Content-Type': 'text/html'});
|
res.writeHead(200, {'Content-Type': 'text/html'});
|
||||||
res.write(data);
|
res.write(data);
|
||||||
|
|
Loading…
Reference in a new issue