Preserve PathBase in SPA back/forward flows by using server canonical URL for initial request state#2027
Draft
Copilot wants to merge 2 commits into
Draft
Preserve PathBase in SPA back/forward flows by using server canonical URL for initial request state#2027Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/riganti/dotvvm/sessions/185cef08-b554-4abb-8a19-327cc6efdb86 Co-authored-by: tomasherceg <5599524+tomasherceg@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix back navigation corrupts PathBase usage from version 4.3.9
Preserve PathBase in SPA back/forward flows by using server canonical URL for initial request state
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From 4.3.9 onward, SPA back navigation could leave client request state pointing to a PathBase-stripped URL, causing subsequent SPA-triggered requests/navigation to target wrong paths (e.g.
/spa-page2instead of/subpath/spa-page2).This change keeps SPA request state aligned with the server-canonical route URL returned by navigation responses.
SPA URL state handling
response.result.url(server canonical URL) over the client-normalized URL.getInitialUrl()PathBase-aware after SPA navigation/back-forward restoration.Regression coverage
getInitialUrl()is updated to that server URL.Behavioral impact