您可以在初始化程序中编写中间件,并更新来自trello webhooks的参数。像下面-
class TrelloWebhooks
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
trello_action = request.params['action']
request.update_param('trello_action', trello_action)
status, headers, response = @app.call(env)
[status, headers, response]
end
end
Rails.application.config.middleware.use 'TrelloWebhooks'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句