Skip to content

Commit

Permalink
Develop: use req.path to check for static files (#2876)
Browse files Browse the repository at this point in the history
Allows for query parameters to passed on to static files.

Fix for #1655
  • Loading branch information
alampros authored and KyleAMathews committed Nov 10, 2017
1 parent 8562121 commit f9b0870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/develop.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async function startServer(program) {
app.get(`*`, (req, res, next) => {
// Load file but ignore errors.
res.sendFile(
directoryPath(`/public/${decodeURIComponent(req.url)}`),
directoryPath(`/public${decodeURIComponent(req.path)}`),
err => {
// No err so a file was sent successfully.
if (!err || !err.path) {
Expand Down

0 comments on commit f9b0870

Please sign in to comment.