Skip to content

Commit

Permalink
Check .svg before resolve attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Oct 29, 2022
1 parent 79757bc commit 7e658fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/server/links/shortener.ts
Expand Up @@ -7,13 +7,13 @@ export function shortener(): Handle {
try {
const url = new URL(event.request.url);

const destination = resolveShortlink(url, LINKS);
if (!destination) {
// Pass to QR code generation endpoint.
if (url.pathname.toLowerCase().endsWith('.svg')) {
return resolve(event);
}

// Pass to QR code generation endpoint.
if (url.pathname.toLowerCase().endsWith('.svg')) {
const destination = resolveShortlink(url, LINKS);
if (!destination) {
return resolve(event);
}

Expand Down

0 comments on commit 7e658fa

Please sign in to comment.