juzhiyuan commented on a change in pull request #692:
URL: https://github.com/apache/apisix-dashboard/pull/692#discussion_r517428133



##########
File path: web/src/pages/Route/transform.ts
##########
@@ -133,17 +140,15 @@ export const transformRouteData = (data: 
RouteModule.Body) => {
     methods,
   };
 
-  if (data.plugins) {
-    const { redirect } = data.plugins;
-    if (redirect?.http_to_https) {
-      form1Data.redirectOption = 'forceHttps';
-    } else if (redirect?.uri) {
-      form1Data.redirectOption = 'customRedirect';
-      form1Data.ret_code = redirect?.ret_code;
-      form1Data.redirectURI = redirect?.uri;
-    } else {
-      form1Data.redirectOption = 'disabled';
-    }
+  const redirect = data.plugins?.redirect || {};
+  if (redirect?.http_to_https) {

Review comment:
       ? Is not needed, because redirect will fallback to empty object.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to