Skip to content

Commit

Permalink
Force addition of a query string for server routes
Browse files Browse the repository at this point in the history
Fixes #107, which I believe can be traced back to beefy.
  • Loading branch information
hughsk committed Mar 8, 2015
1 parent 32c7cfa commit d59869b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ function createServer(root) {
})

http.createServer(function(req, res) {
// Force the addition of a query string. This
// works around an issue in beefy until it gets fixed:
// https://github.com/stackgl/shader-school/issues/107
req.url = req.url.indexOf('?') === -1
? req.url + '?'
: req.url

var uri = url.parse(req.url).pathname
var paths = uri.split('/').filter(Boolean)

Expand Down

0 comments on commit d59869b

Please sign in to comment.