preflight

preflight requests middleware

Usage no npm install needed!

<script type="module">
  import preflight from 'https://cdn.skypack.dev/preflight';
</script>

README

Preflight

Preflight requests middleware.

Installation

npm install preflight

Usage

preflight = require('preflight');
...
app.use(preflight());

With this middleware enable after CORS and before authentication, every preflight request will return a 204 http code.

License

MIT License, see LICENSE