feat: redirect vite.plus vanity domain to installer scripts#30
Merged
Conversation
Point the newly-attached vite.plus apex domain at the Vite+ install scripts so `curl https://vite.plus | sh` and `irm https://vite.plus/ps1 | iex` work as install entry points: https://vite.plus -> 302 https://viteplus.dev/install.sh https://vite.plus/ps1 -> 302 https://viteplus.dev/install.ps1 Implemented as a host-based middleware mirroring the existing 01.redirect-to-custom-domain pattern. Only the vite.plus apex host is matched; the canonical setup host, the legacy host, and localhost fall through untouched. Any non-/ps1 path defaults to install.sh.
Brooooooklyn
approved these changes
Jun 3, 2026
|
✅ Staging deployment successful! Preview: https://vp-setup-staging.void.app/ |
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.
What
The
vite.plusapex domain now points at this Worker. This adds a host-based redirect so the short domain works as an installer entry point:https://vite.plushttps://viteplus.dev/install.shhttps://vite.plus/ps1https://viteplus.dev/install.ps1So
curl https://vite.plus | shandirm https://vite.plus/ps1 | iexboth work.How
New middleware
middleware/02.redirect-vite-plus.ts, mirroring the existing01.redirect-to-custom-domain.tspattern with an extracted, unit-testedbuildViteplusRedirect()helper.vite.plusapex host is matched. The canonicalsetup.viteplus.devhost, the legacyvp-setup.void.apphost, andlocalhost(dev) fall through untouched, so the download page and existing legacy redirect keep working.www.vite.plusis intentionally not matched (only the apex was requested)./ps1defaults toinstall.sh; a trailing slash on/ps1is tolerated.Tests
Adds
tests/redirect-vite-plus.test.ts(9 cases): both redirect rules, trailing slash, arbitrary paths, query strings, and the null/fall-through cases for other hosts and a missing host header.vp checkandvp test(31 tests) pass.Note for deploy
For these redirects to fire,
vite.plusmust be attached as a custom domain/route on the deployed Worker, not just pointed via DNS. Once requests reach the Worker withHost: vite.plus, the redirect applies.