File tree Expand file tree Collapse file tree 4 files changed +9
-1
lines changed
Expand file tree Collapse file tree 4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 3030* Dynamic responses based on query params
3131* Allow organize your imposters with structured folders (using new extension ` .imp.json ` )
3232* Allow write multiple imposters by file
33+
34+ ## v0.3.1 (2019/05/07)
35+
36+ * Allow CORS requests
Original file line number Diff line number Diff line change 77 "net/http"
88
99 killgrave "github.com/friendsofgo/killgrave/internal"
10+ "github.com/gorilla/handlers"
1011 "github.com/gorilla/mux"
1112)
1213
@@ -36,5 +37,5 @@ func main() {
3637
3738 httpAddr := fmt .Sprintf ("%s:%d" , * host , * port )
3839 log .Printf ("The fake server is on tap now: http://%s:%d\n " , * host , * port )
39- log .Fatal (http .ListenAndServe (httpAddr , r ))
40+ log .Fatal (http .ListenAndServe (httpAddr , handlers . CORS ()( r ) ))
4041}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module github.com/friendsofgo/killgrave
33go 1.12
44
55require (
6+ github.com/gorilla/handlers v1.4.0
67 github.com/gorilla/mux v1.7.1
78 github.com/pkg/errors v0.8.1
89 github.com/stretchr/testify v1.3.0 // indirect
Original file line number Diff line number Diff line change 11github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
22github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
3+ github.com/gorilla/handlers v1.4.0 h1:XulKRWSQK5uChr4pEgSE4Tc/OcmnU9GJuSwdog/tZsA =
4+ github.com/gorilla/handlers v1.4.0 /go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ =
35github.com/gorilla/mux v1.7.1 h1:Dw4jY2nghMMRsh1ol8dv1axHkDwMQK2DHerMNJsIpJU =
46github.com/gorilla/mux v1.7.1 /go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs =
57github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I =
You can’t perform that action at this time.
0 commit comments