Arcjet extension of the Headers class
npm install @arcjet/headers@arcjet/headers[Arcjet][arcjet] extension of the Headers class.
- npm package (@arcjet/headers)
- GitHub source code (headers/ in arcjet/arcjet-js)
This is an internal utility to help us deal with [Headers][mdn-headers].
This exists to prevent the cookie header from being set and non-string values
from being set.
You should not use this but use Headers or plain objects instead.
This package matches our current needs which are likely different from yours.
This package is ESM only.
Install with npm in Node.js:
``sh`
npm install @arcjet/headers
`ts
import { ArcjetHeaders } from "@arcjet/headers";
const headers = new ArcjetHeaders({ abc: "123" });
console.log(headers.get("abc")); // => "123"
``
[Apache License, Version 2.0][apache-license] © [Arcjet Labs, Inc.][arcjet]
[arcjet]: https://arcjet.com
[apache-license]: http://www.apache.org/licenses/LICENSE-2.0
[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers