Trying to fix webhooks

James Peret 8 年之前
父节点
当前提交
7abd33a3de
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      app/models/agents/webhook_agent.rb

+ 0 - 3
app/models/agents/webhook_agent.rb

@@ -52,9 +52,6 @@ module Agents
52 52
       secret = params.delete('secret')
53 53
       return ["Not Authorized", 401] unless secret == options['secret']
54 54
 
55
-      # check the verbs
56
-      verbs = (interpolated['verbs'] || 'post').split(/,/).map { |x| x.strip.downcase }.select { |x| x.present? }
57
-      return ["Please use #{verbs.join('/').upcase} requests only", 401] unless verbs.include?(method)
58 55
 
59 56
       [payload_for(params)].flatten.each do |payload|
60 57
         create_event(payload: payload)