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(cli): respect router.trailingSlash when serving static files #8398

Merged
merged 2 commits into from
Nov 30, 2020

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Nov 25, 2020

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)

Description

serve-static defaults to redirect directories to trailingSlash (see docs). This PR respects the user's choice (defaulting not to redirect).

This does change behaviour because it will no longer redirect by default (i.e. if trailingSlash is undefined), but this will almost certainly only be true on the local machine as it's unlikely users will serve their static sites in production with nuxt start

closes #8350

Checklist:

  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe
@danielroe danielroe changed the title fix(cli, server): respect router.trailingSlash when serving static files fix(cli): respect router.trailingSlash when serving static files Nov 25, 2020
@danielroe danielroe marked this pull request as ready for review November 25, 2020 23:31
@atinux atinux self-requested a review November 30, 2020 10:15
@pi0 pi0 merged commit 09748d4 into dev Nov 30, 2020
@pi0 pi0 deleted the trailingslash-redirect branch November 30, 2020 14:57
@pi0 pi0 mentioned this pull request Nov 30, 2020
Copy link

@B-starboy B-starboy left a comment

Choose a reason for hiding this comment

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

I have had a lot of trouble with this router/stash program. Personally I’m glad you guys are working on this. Thanks 🙏

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

Successfully merging this pull request may close these issues.

Router trailing slash not behaving as expected.
5 participants