Просмотр исходного кода

Merge pull request #3674 from weseek/imprv/pass-verificationAccessToken-at-without-proxy

Imprv/pass verification access token at without proxy
itizawa 5 лет назад
Родитель
Сommit
48f1a813c5
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/server/routes/apiv3/slack-bot.js

+ 4 - 0
src/server/routes/apiv3/slack-bot.js

@@ -12,6 +12,10 @@ module.exports = (crowi) => {
 
   // Check if the access token is correct
   function verificationAccessToken(req, res, next) {
+    const botType = crowi.configManager.getConfig('crowi', 'slackbot:currentBotType');
+    if (botType === 'customBotWithoutProxy') {
+      return next();
+    }
     const slackBotAccessToken = req.body.slack_bot_access_token || null;
 
     if (slackBotAccessToken == null || slackBotAccessToken !== this.crowi.configManager.getConfig('crowi', 'slackbot:access-token')) {