You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/09/22 06:42:38 UTC

[apisix-dashboard] branch master updated: fix: checkHostWithSSL with empty hosts (#502)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new d61a5d9  fix: checkHostWithSSL with empty hosts (#502)
d61a5d9 is described below

commit d61a5d9f203dcfb0ecf1a884ef9cc7e597b1cc58
Author: litesun <7s...@gmail.com>
AuthorDate: Tue Sep 22 14:33:48 2020 +0800

    fix: checkHostWithSSL with empty hosts (#502)
    
    * feat: preview pluginchart (#456)
    
    * feat: added pluginchart preview in route step4
    
    * feat: change PluginChart to PluginOrchestration
    
    * add tools to check ASF headers in code files. (#454)
    
    * chore: remove unnecessary license file (#462)
    
    * remove unnecessary license file
    
    * remove unnecessary license file for `api7 dashboard`
    
    * Increase the checking of .conf and .toml files. And delete the redundant configuration of the ASF-Release.cfg file. (#461)
    
    * Increase the checking of .conf and .toml files.
    
    * Skip the check of dag-to-lua-1.1/README.md file
    
    * Put the "run Makefile" check before "get lua lib".
    
    * Put the "run Makefile" check before "get lua lib".
    
    * Put the "run Makefile" check before "get lua lib".
    
    Co-authored-by: lin <li...@MBPro.local>
    
    * ci: Add lint (#455)
    
    Co-authored-by: Rapiz <co...@rapiz.me>
    
    * Feat: dashboard support route group (#433)
    
    * feat: route group UI
    
    * feat(route-ui): add routegroup when create route
    
    * fix: add routegroup to route list
    
    * fix: support add routegroup together with route
    
    * fix: route path define error
    
    * feat: trigger redeploy
    
    * fix: update i18n key
    
    Co-authored-by: 琚致远 <ju...@apache.org>
    
    * feature:Independent license check operation file. (#465)
    
    * feat: support ungroup in manager api (#460)
    
    * feat: support ungroup in manager api
    
    * fix: synchronize route group to route
    
    * fix: update test case
    
    * feat: add publish status to route in manager api (#450)
    
    * feat: add publish status to route in manager api
    
    * fix: update publish and offline route
    
    * feat: add route publish test module
    
    * fix: synchronize content for route publish/offline
    
    * feat(route): add publish and offline to route (#451)
    
    * feat(route): add publish and offline to route
    
    * feat: trigger redeploy
    
    * feat: trigger redeploy
    
    * Update Create.tsx
    
    * fix: update refer to the code review
    
    * fix: init status default value
    
    * fix: add a help msg to status Form.Item
    
    Co-authored-by: 琚致远 <ju...@apache.org>
    
    * feat: remove netlify (#472)
    
    * fix: host should not be required (#477)
    
    * feat: added new plugin dependency (#475)
    
    * feat: added new plugin dependency
    
    * feat: omit shadow var
    
    * feat: omit shadow var
    
    * fix: host should not be required (#479)
    
    * fix: host should not be required
    
    * feat: remove required rule
    
    * feat: Route debug (#485)
    
    * feat: new api get route and apisix url
    
    * feat: online debug
    
    * fix: update refer to the review, fix logical error as well
    
    * fix: rename getRouteWithApisixUrl
    
    * feat: update plugin (#482)
    
    * feat: improve route (#483)
    
    * feat: improve step1
    
    * feat: improve step2
    
    * feat: improve createStep4
    
    * feat: improve transform
    
    * fix: event loop
    
    * feat: clean code
    
    * fix: lost route_group info when enable redirect
    
    * feat: UI improve
    
    * fix: checkHostWithSSL with empty hosts
    
    * Update Create.tsx
    
    Co-authored-by: Firstsawyou <52...@users.noreply.github.com>
    Co-authored-by: nic-chen <33...@users.noreply.github.com>
    Co-authored-by: lin <li...@MBPro.local>
    Co-authored-by: Rapiz <co...@rapiz.me>
    Co-authored-by: Rapiz <co...@rapiz.me>
    Co-authored-by: liuxiran <be...@126.com>
    Co-authored-by: 琚致远 <ju...@apache.org>
---
 src/pages/Route/Create.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/pages/Route/Create.tsx b/src/pages/Route/Create.tsx
index 759d775..86e2691 100644
--- a/src/pages/Route/Create.tsx
+++ b/src/pages/Route/Create.tsx
@@ -226,8 +226,11 @@ const Page: React.FC<Props> = (props) => {
       if (step === 1) {
         form1.validateFields().then((value) => {
           const { redirectOption, hosts } = value;
+          const filterHosts = hosts.filter(Boolean);
           Promise.all([
-            redirectOption === 'forceHttps' ? checkHostWithSSL(hosts) : Promise.resolve(),
+            redirectOption === 'forceHttps' && filterHosts.length !== 0
+              ? checkHostWithSSL(hosts)
+              : Promise.resolve(),
             checkUniqueName(value.name, (props as any).match.params.rid || ''),
           ]).then(() => {
             setStep(nextStep);