()
| 25 | } |
| 26 | |
| 27 | function getPreflightEndpointChecks(): PreflightEndpointCheck[] { |
| 28 | return [ |
| 29 | { |
| 30 | url: buildNoumenaPlatformUrl('/v1/me'), |
| 31 | method: 'GET', |
| 32 | expectedStatuses: [200, 401, 403], |
| 33 | }, |
| 34 | { |
| 35 | url: getOauthTokenUrl(), |
| 36 | method: 'POST', |
| 37 | expectedStatuses: [200, 400, 401, 403], |
| 38 | data: 'probe=1', |
| 39 | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| 40 | }, |
| 41 | ]; |
| 42 | } |
| 43 | |
| 44 | export function getPreflightEndpoints(): string[] { |
| 45 | return getPreflightEndpointChecks().map(endpoint => endpoint.url); |
no test coverage detected