tao12345666333 commented on code in PR #975:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/975#discussion_r854974479


##########
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:
   yes, if there is no redirect target, then how can there be a redirect status 
code?



-- 
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

Reply via email to