Skip to content

Commit

Permalink
fix: don't allow put to commands endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Apr 5, 2020
1 parent 111ac10 commit e6f1cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func commandsOption(cctx oldcmds.Context, command *cmds.Command, allowGet bool)

cfg := cmdsHttp.NewServerConfig()
cfg.AllowGet = allowGet
corsAllowedMethods := []string{http.MethodPost, http.MethodPut}
corsAllowedMethods := []string{http.MethodPost}
if allowGet {
corsAllowedMethods = append(corsAllowedMethods, http.MethodGet)
}
Expand Down

0 comments on commit e6f1cb2

Please sign in to comment.