Adapt the httprouter on cors adaptor example

Former-commit-id: 3abd819fc519faac55322d210a42c4d230bb46d5
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-02-17 08:25:25 +02:00
parent 74872c62c7
commit d33371f393

View File

@ -3,12 +3,15 @@ package main
import (
"gopkg.in/kataras/iris.v6"
"gopkg.in/kataras/iris.v6/adaptors/cors"
"gopkg.in/kataras/iris.v6/adaptors/httprouter"
)
func main() {
app := iris.New()
app.Adapt(iris.DevLogger())
app.Adapt(httprouter.New())
crs := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowCredentials: true,