Steven Fukase пре 4 година
родитељ
комит
1f1a17cc9a
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/server/routes/apiv3/slack-integration-settings.js

+ 2 - 1
src/server/routes/apiv3/slack-integration-settings.js

@@ -56,7 +56,8 @@ module.exports = (crowi) => {
         .isIn(['officialBot', 'customBotWithoutProxy', 'customBotWithProxy']),
     ],
     proxyUri: [
-      body('proxyUri').trim().matches(/^(https?:\/\/)/).isURL({ require_tld: false }),
+      body('proxyUri').if(value => value !== '').trim().matches(/^(https?:\/\/)/)
+        .isURL({ require_tld: false }),
     ],
     AccessTokens: [
       query('tokenGtoP').trim().not().isEmpty()