Browse Source

Quick fix to ensure that images of the steam blog are still loaded correctly.

pull/27/head
jrtechs 6 years ago
parent
commit
b6ceb8734a
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      server.js

+ 6
- 3
server.js View File

@ -53,7 +53,7 @@ app.use(function(request, result)
var project = false;
projects.forEach(function(projectName)
{
if(filename.includes(projectName))
if(filename.startsWith(projectName))
{
require("./includes/projects.js").main(request, result, projectName);
project = true;
@ -66,10 +66,13 @@ app.use(function(request, result)
//don't do blog stuff
}
else if(filename.includes(".svg") || filename.includes(".svg"))
{
result.writeHead(200, {'Content-Type': 'image/svg+xml'});
}
//handles image requests
else if(filename.includes("/img/") || filename.includes(".jpg") ||
filename.includes(".png") || filename.includes(".ico")
|| filename.includes(".svg"))
filename.includes(".png") || filename.includes(".ico"))
{
includes.sendImage(result, filename, cache);
}

Loading…
Cancel
Save