fix: redirect trailing slashes to prevent 500 errors#51
Draft
Conversation
URLs with trailing slashes (e.g. /protocol/) were returning 500 errors. This adds vercel.json with trailingSlash: false to automatically redirect trailing slash URLs to their canonical non-slash versions.
snario
pushed a commit
that referenced
this pull request
Feb 3, 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
Fixes 500 errors when accessing URLs with trailing slashes (e.g.
/protocol/vs/protocol).Problem
Vocs/Waku's router expects paths without trailing slashes. When a user accesses a URL with a trailing slash, the framework throws "Path must not end with
/" and returns a 500 error.Solution
Add
vercel.jsonwithtrailingSlash: falseto automatically redirect trailing slash URLs to their canonical non-slash versions with a 308 permanent redirect at the edge layer before the request reaches the application.Testing
https://docs.tempo.xyz/protocol/will redirect tohttps://docs.tempo.xyz/protocolThread: https://tempoxyz.slack.com/archives/C09SB72CWJC/p1769729266093459