fix(bikeshare): address the GBFS proxy by path, not query string (#569)

Supersedes #441 by @MiguelGFerreira, ported onto the current component layout with fixes from review.

Verified before merge: format, package boundaries, unit suite, build, and the browser tracking suite; a browser harness for the change where one applies; adversarial review applied.

Co-authored-by: MiguelGFerreira <[email protected]>
This commit is contained in:
Bilawal SidhuandMiguelGFerreira authored and GitHub committed 2026-09-14 21:08:12 -05:00
1 parent 96a6b49477
commit 2b0fcd4595
6 files changed
+312 -4

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ export function createBikeshareSource({
throw new TypeError('A public HTTPS GBFS URL is required');
signal?.throwIfAborted();
const response = await fetchImpl(
'/api/gbfs?url=' + encodeURIComponent(url.href),
'/api/gbfs/' + encodeURIComponent(url.href),
{ method: 'GET', headers: { Accept: 'application/json' }, signal },
);
if (!response.ok) throw new Error('GBFS HTTP ' + response.status);