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: ensure pathPrefix works with trailingSlash option #39164

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rosszurowski
Copy link

Description

This commit fixes an issue where the pathPrefix option was ignored when the trailing slash option was set to "never." The cause was that adding the prefix seemed to be left out of a few code paths.

Documentation

This feature is documented on this page, however, it doesn't work as described right now when the trailingSlash option is set to never.

Tests

I've tested this change on a production Gatsby site, but haven't added any automated tests. I'm happy to attempt to do so, but I couldn't get tests working locally, nor could I push to my fork (maybe because of the repository size).

Related Issues

Fixes #39043

This commit fixes an issue where the `pathPrefix` option was ignored when the trailing slash option was set to "never." The cause was that adding the prefix seemed to be left out of a few code paths.
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 18, 2024
@serhalp serhalp self-assigned this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trailing slash redirect broken when using path prefix
2 participants