Add CORS to create session and make it return text plain session ID

This commit is contained in:
Marcos Lilljedahl
2017-01-13 19:22:57 -03:00
parent d1d69e5ff0
commit c81a712a28
2 changed files with 6 additions and 1 deletions

2
api.go
View File

@@ -79,7 +79,7 @@ func main() {
}
}).Methods("GET")
r.HandleFunc("/", handlers.NewSession).Methods("POST")
r.Handle("/", c.Handler(http.HandlerFunc(handlers.NewSession))).Methods("POST")
n := negroni.Classic()
n.UseHandler(r)