{"library":"access-control","type":"library","category":null,"description":"The `access-control` package offers a minimal and straightforward implementation for managing HTTP Access Control (CORS) according to the W3C specification. It is designed as a focused utility for applications needing to handle cross-origin requests, abstracting the complexities of CORS header management. As of its last known release, the package is at version 1.0.1, published over 8 years ago, indicating it is no longer actively maintained. Its core functionality involves configuring allowed origins, HTTP methods, credentials handling, preflight request caching (`maxAge`), and exposing/allowing specific headers. A key differentiator is its direct handling of `OPTIONS` preflight requests and automatic `403 Forbidden` responses for invalid CORS attempts, as well as automatic adjustment of `Access-Control-Allow-Origin` when `*` is combined with `credentials: true` for specification compliance.","language":"javascript","status":"abandoned","version":"1.0.1","tags":["javascript","CORS","HTTP","Access","Control","Allow","Origin"],"last_verified":"Wed May 27","install":[{"cmd":"npm install access-control","imports":["import access from 'access-control';","const access = require('access-control');","const corsMiddleware = access({ origins: ['http://example.com'] });"]},{"cmd":"yarn add access-control","imports":[]},{"cmd":"pnpm add access-control","imports":[]}],"homepage":null,"github":"https://github.com/primus/access-control","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/access-control","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/access-control/compatibility"}}