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
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user