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

+2 -2
View File
@@ -18,9 +18,9 @@ test('station source keeps upstream URLs behind the fixed GBFS endpoint', async
assert.equal(calls.length, 0);
await source.getStations('https://example.test/stations.json');
const url = new URL(calls[0][0], 'https://app.example');
assert.equal(url.pathname, '/api/gbfs');
assert.equal(url.search, '');
assert.equal(
url.searchParams.get('url'),
decodeURIComponent(url.pathname.replace(/^\/api\/gbfs\//, '')),
'https://example.test/stations.json',
);
});