Skip to content

Commit d59869b

Browse files
committed
Force addition of a query string for server routes
Fixes #107, which I believe can be traced back to beefy.
1 parent 32c7cfa commit d59869b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ function createServer(root) {
6565
})
6666

6767
http.createServer(function(req, res) {
68+
// Force the addition of a query string. This
69+
// works around an issue in beefy until it gets fixed:
70+
// https://github.com/stackgl/shader-school/issues/107
71+
req.url = req.url.indexOf('?') === -1
72+
? req.url + '?'
73+
: req.url
74+
6875
var uri = url.parse(req.url).pathname
6976
var paths = uri.split('/').filter(Boolean)
7077

0 commit comments

Comments
 (0)