-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Redirect from alias to canonical URL [azuredevops vso] #2939
Conversation
As described in #2340, this provides a way to replace an old alias with a redirect. This makes it easier to migrate our URLs over time without making our matching patterns more complicated. The 301 redirect is sent back to the requester. If a user pastes the aliased URL into the address bar, it'll be replaced in the browser with the new URL, which gently encourages them to migrate. We can do some follow-ons to migrate a few more of these. Close #2340
|
Haven't gone through this yet, but I'm pumped about the feature 💯 |
Self-requesting a review to remind me to look at this one tonight 😄 |
} | ||
|
||
static get isDeprecated() { | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we need to register all the redirected services in the deprecated services list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That list doesn't do anything. Those dates are useful to have readable in code, because it could let us write tests that remind us to downgrade or remove them. Though I think the dates could be placed in the call to deprecatedService
as easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth writing down redirected services somewhere in a similar fashion to keep track of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we could stop supporting the old routes after a good while. In that case having the date we started redirecting would be helpful.
I'd suggest we do that inline by throwing another parameter in the function call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good to approve this, can wait if we wanna do that though
Went ahead and approved, but will wait to merge in case we do want to include dates as part of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have just added dates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Added a few thoughts inline
As a follow up item we should probably add documentation for redirects somewhere |
As described in #2340, this provides a way to replace an old alias with a redirect. This makes it easier to migrate our URLs over time without making our matching patterns more complicated.
The 301 redirect is sent back to the requester. If a user pastes the aliased URL into the address bar, it'll be replaced in the browser with the new URL, which gently encourages them to migrate.
We can do some follow-ons to migrate a few more of these.
Close #2340