Skip to content

Commit

Permalink
Drop support for trailing slashes
Browse files Browse the repository at this point in the history
URL ends with `/` which is not reasonable for an image resource.
  • Loading branch information
LitoMore committed Sep 12, 2024
1 parent 93c217e commit 15887f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ const routes: Route[] = [
},
},
{
pattern: new URLPattern({
pathname: '/:iconSlug/:color?/:darkModeColor?{/}?',
}),
pattern: new URLPattern({ pathname: '/:iconSlug/:color?/:darkModeColor?' }),
handler: (request, _info, params) => {
const url = new URL(request.url);
const viewbox = url.searchParams.get('viewbox') || undefined;
Expand Down

0 comments on commit 15887f5

Please sign in to comment.