Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
F1xGOD committed Oct 11, 2024
1 parent c770b5d commit 7d0542d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serve.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ transporter.sendMail(mailOptions, (error, info) => {
// }catch{}
// }
if (req.url.split('?')[0].split('#')[0]=='/'&&config.indexfile==true) {url+='index.html'}
try {readFileSync(url)} catch {try {readFileSync(url+=".html")} catch {if(url == ("./public/mc/1.8.8")){return res.writeHead(200, {'content-type':'text/html', 'access-control-allow-origin':cors?'*':request.headers['host']}).end(readFileSync("./public/mc/1.8.8/index.html"))}
try {readFileSync(url)} catch {try {readFileSync(url+=".html")} catch {if(userpath == ("./public/mc/1.8.8")){return res.writeHead(200, {'content-type':'text/html', 'access-control-allow-origin':cors?'*':request.headers['host']}).end(readFileSync("./public/mc/1.8.8/index.html"))}
console.log(date.gray+ipAddress+" TRIED TO ACCESS NON-EXISTENT RESOURCE!".red+" ("+userpath.gray+")")
return res.end('Not Found') }}
if (req.url.split('?')[0].split('#')[0]=='/'&&config.indexfile==true) {if (config.index) return config.index(req, res, readFileSync(url), type)}
Expand Down

0 comments on commit 7d0542d

Please sign in to comment.