4 Unstar Star 14 Fork 9

flygotm / cors

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

cors

A Cors middleware for flygo

Usage

app := flygo.NewApp()
app.UseFilter(cors.New())
app.Get("/", func(c flygo.Context) {
    c.Text("index")
})
app.Run()

Config

  • Origin :Access-Control-Allow-Origin, default *
cors.Origin("http://domain.com")
  • Methods :Access-Control-Allow-Methods, default GET,POST,PUT,DELETE,PATCH
cors.Methods("GET", "POST")
  • Headers :Access-Control-Allow-Headers
cors.Headers("X-Requested-With")
  • Extra Headers
cors.ExtraHeaders(cors.Header("Access-Control-Max-Age", "86400"))

Comments ( 0 )

Sign in for post a comment

About

A Cors middleware for flygo spread retract
Go
Apache-2.0
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Go
1
https://git.oschina.net/flygotm/cors.git
git@git.oschina.net:flygotm/cors.git
flygotm
cors
cors
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542