Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): always respond with index html without checking path #11400

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

sidharthachatterjee
Copy link
Contributor

During develop, we currently check path before returning our static html:

parsedPath.extname === `` ||

This seems unnecessary because if all handlers above haven't responded to the request yet (webpack dev middleware, express static etc) it is safe to say that the request needs to be handled here.

Currently the checks for path and non-exhaustive and we miss out of complicated cases like /reference/mono-v6.x.x (directory)

Fixes #11348

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner January 29, 2019 21:47
@sidharthachatterjee sidharthachatterjee force-pushed the fix/always-respond-with-index-html-in-develop branch from d1d2369 to 57a9135 Compare January 29, 2019 21:50
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) thanks for fixing!

@wardpeet wardpeet merged commit 2f79efe into master Jan 31, 2019
@wardpeet wardpeet deleted the fix/always-respond-with-index-html-in-develop branch January 31, 2019 18:20
wardpeet pushed a commit that referenced this pull request Feb 11, 2019
…1400)

During develop, we currently check path before returning our static html:
https://github.com/gatsbyjs/gatsby/blob/aa4f9397665d6d1e7ea6cdd3bfd6f40b449daccf/packages/gatsby/src/commands/develop.js#L192

This seems unnecessary because if all handlers above haven't responded to the request yet (webpack dev middleware, express static etc) it is safe to say that the request _needs_ to be handled here. 

Currently the checks for path and non-exhaustive and we miss out of complicated cases like /reference/mono-v6.x.x (directory)

Fixes #11348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants