mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
091ebed8e4
routing_valhalla_provider (fossgis, trek or custom) sits beside the routing URLs under Admin, Default user settings, admin only and locked on a managed install. Without a choice an own Valhalla is custom, an own OSRM alone asks no Valhalla, and otherwise the TREK services answer. The planner asks them through the same-origin relay, so no connect-src changes. A relay that answers 401 (a shared page without a sign-in), 403, 413, 429 or 5xx sends the question to FOSSGIS without a word and is left alone for ten minutes. A long line to describe goes as a polyline.
14 lines
507 B
TypeScript
14 lines
507 B
TypeScript
import { http, HttpResponse } from 'msw';
|
|
|
|
/**
|
|
* The routing relay to the TREK services' Valhalla, answered the way a server
|
|
* without an installation key answers it: 503, so the planner turns to the
|
|
* public Valhalla as it does there. A test about the relay overrides this
|
|
* with server.use().
|
|
*/
|
|
export const routingHandlers = [
|
|
http.post('/api/routing/valhalla/:action', () =>
|
|
HttpResponse.json({ error: 'The TREK routing service is not available on this instance' }, { status: 503 })
|
|
),
|
|
];
|