Skip to content

Add non-catch-all version of dashboard route#6327

Open
ukutaht wants to merge 5 commits intomasterfrom
dashboard-link-trailing-slash-fix
Open

Add non-catch-all version of dashboard route#6327
ukutaht wants to merge 5 commits intomasterfrom
dashboard-link-trailing-slash-fix

Conversation

@ukutaht
Copy link
Copy Markdown
Contributor

@ukutaht ukutaht commented May 7, 2026

Currently dashboard links are generated with trailing slash across the application. This PR adds a route without the catch-all part which affects the router helpers so the link is generated without the trailing slash as shown here:

iex(6)> PlausibleWeb.Router.Helpers.stats_path(PlausibleWeb.Endpoint, :stats, "plausible.io", [])
"/plausible.io/"
iex(7)> r PlausibleWeb.Router
{:reloaded, [PlausibleWeb.Router, PlausibleWeb.Router.Helpers]}
iex(8)> PlausibleWeb.Router.Helpers.stats_path(PlausibleWeb.Endpoint, :stats, "plausible.io", [])
"/plausible.io"

The trailing slash appears in live demo stats, this is an attempt to suppress it.
Screenshot 2026-05-07 at 14 15 05

@ukutaht ukutaht requested a review from a team May 7, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants