@bejibun/cors
v0.1.20
Published
Cors for Bejibun Framework
Maintainers
Readme
Cors for Bejibun
Cors for Bejibun Framework.
Usage
Installation
Install the package.
# Using Bun
bun add @bejibun/cors
# Using Bejibun
bun ace install @bejibun/corsConfiguration
The configuration file automatically executed if you are using ace.
Or
Add cors.ts inside config directory on your project if doesn't exist.
config/cors.tsconst config: Record<string, any> = {
allowedHeaders: "*",
credentials: false,
exposedHeaders: [],
maxAge: 86400,
methods: "*",
origin: "*"
};
export default config;How to Use
How to use the package.
import Cors from "@bejibun/cors";
return Response.json({...}, {
headers: {
...Cors.init
}
});
// OR
return Response.json({...}, {
headers: Cors.init
});☕ Support / Donate
If you find this project helpful and want to support it:
Or you can buy this $BJBN (Bejibun) tokens here.
