fix: proxy Bandsintown events through backend to bypass 403, always show ticket link with sold-out badge

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-06-08 01:23:00 +02:00
1 parent 914297651e
commit 98c964ecae
3 files changed
+21 -4

No files matched your search

+14
View File
@@ -315,6 +315,20 @@ app.get('/api/itunes/:endpoint', (req, res) => {
}).on('error', e => res.status(502).json({ error: e.message }));
});
app.get('/api/events/:artist', (req, res) => {
const artist = req.params.artist;
const target = `https://rest.bandsintown.com/artists/${encodeURIComponent(artist)}/events?app_id=novasonic`;
https.get(target, {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
'Accept': 'application/json',
}
}, upstream => {
res.setHeader('Content-Type', 'application/json');
upstream.pipe(res);
}).on('error', e => res.status(502).json({ error: e.message }));
});
app.get('/api/health', (req, res) => {
res.json({
status: 'ok', ytdlpVersion,