mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
96a6b49477
commit
2b0fcd4595
6 files changed
+312
-4
No files matched your search
@@ -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',
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user