server: prevent url query from breaking file serving
This commit is contained in:
parent
5dbb5fa2e1
commit
caf610c0c9
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ var path = require('path'),
|
|||
|
||||
function httpRoute(req, res) {
|
||||
res.sendFile = (path)=>{
|
||||
send(req, path).pipe(res)
|
||||
send(req, path.split('?')[0]).pipe(res)
|
||||
}
|
||||
|
||||
if (req.url === '/' || req.url.indexOf('/?') === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue