feat: redirect vp-setup.void.app to setup.viteplus.dev#4
Merged
Conversation
Add global Void middleware that 301-redirects requests on the default `vp-setup.void.app` host to the canonical custom domain `setup.viteplus.dev`, preserving path and query. Other hosts (custom domain, localhost, preview subdomains) pass through untouched.
|
✅ Staging deployment successful! Preview: https://vp-setup-staging.void.app/ |
| expect(buildRedirectTarget("localhost:5173", "http://localhost:5173/")).toBeNull(); | ||
| }); | ||
|
|
||
| it("returns null when host header is missing", () => { |
Member
There was a problem hiding this comment.
nit: can the host header ever be null (in a real world scenario)? 👀
Member
Author
There was a problem hiding this comment.
I understand it doesn't, but hono's API does indeed return undefined https://hono.dev/docs/api/request#header 😢
Member
There was a problem hiding this comment.
I mean technically this is possible with HTTP1 😂
And then the server should reject.
TheAlexLichter
approved these changes
Apr 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.
Summary
middleware/01.redirect-to-custom-domain.tsthat issues a 301 redirect from the defaultvp-setup.void.apphost to the canonical custom domainhttps://setup.viteplus.dev, preserving path and query stringlocalhostduring dev, any preview/staging subdomains) pass through untouchedbuildRedirectTarget()helper so the logic is unit-testable without spinning up HonoTest plan
vp test— 30 tests pass (6 new intests/redirect.test.ts)vp check— clean (format, lint, type-check)curl -I https://vp-setup.void.app/returns301withLocation: https://setup.viteplus.dev/curl -IL 'https://vp-setup.void.app/?tag=v1.2.3&arch=arm64'preserves query and lands on 200curl -I https://setup.viteplus.dev/returns200(no redirect loop)🤖 Generated with Claude Code