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

type custom, for redirect and rewrite has #27431

Closed

Conversation

hacknlove
Copy link

Feature

It's a secondary request in this discussion: #25931

And it's related with this PR #27103

The "has not" would be simple, it only redirects on absence.

If the developer wants to redirect when the value is not equal, he can use the custom check.

Also the custom check makes it possible to write conditional redirections for any scenario, like regular expressions, or

Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

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

Hi, the custom-routes fields need to be serializable since they are stored in a manifest during build time which is then leveraged for next start so a function can not be provided in this case. We are investigating adding an inverse hasNot mode for routes which should cover most cases mentioned.

I'm gonna close this as further discussion can continue on the mentioned thread.

@ijjk ijjk closed this Jul 23, 2021
@hacknlove hacknlove deleted the redirect-has-type-custom-match branch July 23, 2021 20:42
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants