add PUT and DELETE methods

This commit is contained in:
c9s 2021-02-04 13:23:05 +08:00
parent f21b7f06d7
commit 7b7bcf56c9

View File

@ -39,7 +39,7 @@ func (s *Server) Run(ctx context.Context) error {
AllowOrigins: []string{"*"},
AllowHeaders: []string{"Origin", "Content-Type"},
ExposeHeaders: []string{"Content-Length"},
AllowMethods: []string{"GET", "POST"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
AllowWebSockets: true,
AllowCredentials: true,
MaxAge: 12 * time.Hour,