Support for multiple HTTP verbs in routes/HTTPTrigger (#2064)
* Support for multiple HTTP verbs in routes/HTTPTrigger Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Update pkg/apis/core/v1/types.go Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com> * Fix fallbackurl for ingress Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
This commit is contained in:
co-authored by
Harsh Thakur
parent
4038f0384b
commit
673ca25cf2
@@ -80,8 +80,15 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
||||
ht.Spec.RelativeURL = triggerUrl
|
||||
ht.Spec.Prefix = &prefix
|
||||
|
||||
if input.IsSet(flagkey.HtMethod) {
|
||||
ht.Spec.Method = input.String(flagkey.HtMethod)
|
||||
methods := input.StringSlice(flagkey.HtMethod)
|
||||
if len(methods) > 0 {
|
||||
for _, method := range methods {
|
||||
_, err := GetMethod(method)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
ht.Spec.Methods = methods
|
||||
}
|
||||
|
||||
if input.IsSet(flagkey.HtFnName) {
|
||||
|
||||
Reference in New Issue
Block a user