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

Branch redirection drops query args #79

Open
sirreal opened this issue Dec 18, 2018 · 0 comments · Fixed by #81
Open

Branch redirection drops query args #79

sirreal opened this issue Dec 18, 2018 · 0 comments · Fixed by #81
Labels

Comments

@sirreal
Copy link
Member

sirreal commented Dec 18, 2018

We currently use bots to provide the live links like this:

https://calypso.live/?branch=update/tiled-gallery-margins

It's often handy to provide links directly to a set up for testing, which may include path and additional query arguments. When the branch query is rewritten to the hash url, other query args are dropped. For example:

https://calypso.live/block-editor/post?branch=add/tiled-grid-package&flags=jetpack/blocks/beta

Winds up at (notice no flags arg):

https://hash-46d13ec811227b549777d82deb8a02736299c4ac.calypso.live/block-editor/post

Maintain unrecognized query args when redirecting.

@sirreal sirreal added the bug label Dec 18, 2018
dmsnell added a commit that referenced this issue Dec 18, 2018
Resolves #79

When we remap a given URL from `calypso.live?branch=...` to the
"subdomain" URL we have been stripping away the entire query string when
redirecting the browser. This causes problems when we want to pass flags
to Calypso or otherwise send query args.

In this change we're appending the existing query string without the
branch name specified so that we can pass everything else through.

No query arg named `branch` will pass through though.
sirreal pushed a commit that referenced this issue Jan 12, 2019
Resolves #79

When we remap a given URL from `calypso.live?branch=...` to the
"subdomain" URL we have been stripping away the entire query string when
redirecting the browser. This causes problems when we want to pass flags
to Calypso or otherwise send query args.

In this change we're appending the existing query string without the
branch name specified so that we can pass everything else through.

No query arg named `branch` will pass through though.
sirreal pushed a commit that referenced this issue Jan 12, 2019
Middleware: Pass non-branch query parameters on redirect

Resolves #79

When we remap a given URL from `calypso.live?branch=...` to the
"subdomain" URL we have been stripping away the entire query string when
redirecting the browser. This causes problems when we want to pass flags
to Calypso or otherwise send query args.

In this change we're appending the existing query string without the
branch name specified so that we can pass everything else through.

No query arg named `branch` will pass through though.
@sirreal sirreal reopened this Feb 4, 2019
@Automattic Automattic deleted a comment Apr 9, 2020
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 a pull request may close this issue.

2 participants
@sirreal and others