fix cors
This commit is contained in:
6
main.go
6
main.go
@@ -34,6 +34,12 @@ func main() {
|
||||
|
||||
router := router.New()
|
||||
|
||||
router.Handle("OPTIONS /", func(w http.ResponseWriter, r *http.Request) error {
|
||||
w.WriteHeader(200)
|
||||
fmt.Fprintf(w, "ok")
|
||||
return nil
|
||||
})
|
||||
|
||||
router.Handle("POST /auth/register", func(w http.ResponseWriter, r *http.Request) error {
|
||||
var body struct {
|
||||
Email string `json:"email"`
|
||||
|
||||
Reference in New Issue
Block a user