@tumau/cors

CORS for tumau

Usage no npm install needed!

<script type="module">
  import tumauCors from 'https://cdn.skypack.dev/@tumau/cors';
</script>

README

// handle preflight
CorsPreflight(options),
  // handle GET
  CorsActual(options),
  // Handle errors to add CORS even in case of an error
  HttpErrorToTextResponse,
  // or
  HttpErrorToJson,