Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

unger1984/dia_cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED! Move to MONOREPO https://github.com/unger1984/dia

Pub Package

The CORS middleware for Dia.

Install:

Add to pubspec.yaml in dependencies section this:

    dia_cors: ^0.1.1

Then run pub get

Usage:

A simple usage example:

    app.use(cors());

Optional named params:

  • origin - Access-Control-Allow-Origin header. Default: '*'
  • maxAge - Access-Control-Max-Age header
  • credentials - Access-Control-Allow-Credentials header
  • expose - Access-Control-Expose-Headers header

Use with:

  • dia - A simple dart http server in Koa2 style.
  • dia_router - Middleware like as koa_router.
  • dia_body - Package with the middleware for parse request body.
  • dia_static - Package to serving static files.

Features and bugs:

I will be glad for any help and feedback! Please file feature requests and bugs at the issue tracker.

About

The CORS middleware for Dia http server

Resources

License

Stars

Watchers

Forks

Languages