tao12345666333 commented on code in PR #975: URL: https://github.com/apache/apisix-ingress-controller/pull/975#discussion_r860416083
########## pkg/kube/translation/annotations/redirect.go: ########## @@ -15,11 +15,15 @@ package annotations import ( + "strconv" + apisixv1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1" ) const ( - _httpToHttps = AnnotationsPrefix + "http-to-https" + _httpToHttps = AnnotationsPrefix + "http-to-https" + _permanentRedirect = AnnotationsPrefix + "permanent-redirect" + _permanentRedirectCode = AnnotationsPrefix + "permanent-redirect-code" Review Comment: @tokers @AlinsRan According to [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231.html) Status codes between 300 and 308 can indicate redirection. Considering that we will also support temporary redirection, but adding a specific implementation for it alone is not of much value, here I suggest to merge it directly and modify this annotation to `http-redirect` and `http-redirect-code` , the corresponding verification logic is, if not configured, the default is `http.StatusMovedPermanently`, the allowed value is between `http.StatusMultipleChoices` and `http.StatusPermanentRedirect`. -- 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