adding delete to cors

This commit is contained in:
Roland Osborne 2022-06-12 22:25:47 -07:00
parent 7d2d99cc4f
commit 2301c233fe

View File

@ -17,7 +17,7 @@ func main() {
router := app.NewRouter()
origins := handlers.AllowedOrigins([]string{"*"})
methods := handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT", "OPTIONS"})
methods := handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS"})
log.Fatal(http.ListenAndServe(":7000", handlers.CORS(origins, methods)(router)))
}