AlinsRan commented on code in PR #975: URL: https://github.com/apache/apisix-ingress-controller/pull/975#discussion_r854820114
########## pkg/kube/translation/annotations/redirect.go: ########## @@ -37,8 +41,15 @@ func (r *redirect) PluginName() string { func (r *redirect) Handle(e Extractor) (interface{}, error) { var plugin apisixv1.RedirectConfig plugin.HttpToHttps = e.GetBoolAnnotation(_httpToHttps) + plugin.URI = e.GetStringAnnotation(_uri) + + retCode, err := strconv.Atoi(e.GetStringAnnotation(_retCode)) // To avoid empty redirect plugin config, adding the check about the redirect. - if plugin.HttpToHttps { + if err == nil { + plugin.RetCode = retCode + return &plugin, nil Review Comment: Cannot be used alone `ret_code`? the `ret_ code 'needs to be used with' uri ' ? If so, that's not right. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org