Skip to content

Commit ce1c53e

Browse files
committed
Fix apple touch icon and log bad requests
1 parent 69e1c81 commit ce1c53e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
File renamed without changes.

src/app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
1919
<head>
2020
<link rel="icon" href="/favicon.ico" />
2121
<meta name="apple-itunes-app" content="app-id=715886886" />
22+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
2223
</head>
2324
<body className={font.className}>
2425
<NextTopLoader showSpinner={false} />

src/lib/RelistenAPI.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ export class RelistenAPI {
7272
static fetchRandomShow = cache(async (artistSlug: string): Promise<Partial<Tape> | undefined> => {
7373
if (!artistSlug) return undefined;
7474

75+
// if doesnt match
76+
if (!/^[a-z-]+$/i.test(artistSlug)) {
77+
console.error('Tried to load url that doesnt match artist slug format:', artistSlug);
78+
79+
return notFound();
80+
}
81+
7582
return this.cachedFetch<Partial<Tape>>(`/api/v2/artists/${artistSlug}/shows/random`, {
7683
revalidate: 0,
7784
});

0 commit comments

Comments
 (0)