module Roda::RodaPlugins::Csrf

def self.configure(app, opts={})

Load the Rack::Csrf middleware into the app with the given options.
def self.configure(app, opts={})
  return if opts[:skip_middleware]
  app.instance_exec do
    @middleware.each do |(mid, *rest), _|
      if mid.equal?(CSRF)
        rest[0].merge!(opts)
        build_rack_app
        return
      end
    end
    use CSRF, opts
  end
end