{"action":"created","issue":{"url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/139","labels_url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/139/comments","events_url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/139/events","html_url":"https://github.com/rwz/ember-cli-rails/issues/139","id":66209861,"number":139,"title":"Only run middleware on \"ember\" requests","user":{"login":"seanpdoyle","id":2575027,"avatar_url":"https://avatars.githubusercontent.com/u/2575027?v=3","gravatar_id":"","url":"https://api.github.com/users/seanpdoyle","html_url":"https://github.com/seanpdoyle","followers_url":"https://api.github.com/users/seanpdoyle/followers","following_url":"https://api.github.com/users/seanpdoyle/following{/other_user}","gists_url":"https://api.github.com/users/seanpdoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/seanpdoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanpdoyle/subscriptions","organizations_url":"https://api.github.com/users/seanpdoyle/orgs","repos_url":"https://api.github.com/users/seanpdoyle/repos","events_url":"https://api.github.com/users/seanpdoyle/events{/privacy}","received_events_url":"https://api.github.com/users/seanpdoyle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-03T19:06:21Z","updated_at":"2015-04-03T20:10:33Z","closed_at":"2015-04-03T20:09:53Z","body":"Could we provide a hook (either via the routes or a block in the middleware declaration) to determine if a request will be handled by the middleware?\r\n\r\nI think the middleware is running on *all* requests. \r\n\r\nIn testing, precompiling ember for `/api/` requests dramatically slows down an otherwise rapid feedback cycle.\r\n\r\nWhat do you think? (<small>warning: pseudocode approaching</small>)\r\n\r\n```ruby\r\nconfig.use EmberCLI::ReloadMiddleware do |request|\r\n  request.url =~ %r{/frontend/foo}\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/comments/89408734","html_url":"https://github.com/rwz/ember-cli-rails/issues/139#issuecomment-89408734","issue_url":"https://api.github.com/repos/rwz/ember-cli-rails/issues/139","id":89408734,"user":{"login":"rwz","id":129043,"avatar_url":"https://avatars.githubusercontent.com/u/129043?v=3","gravatar_id":"","url":"https://api.github.com/users/rwz","html_url":"https://github.com/rwz","followers_url":"https://api.github.com/users/rwz/followers","following_url":"https://api.github.com/users/rwz/following{/other_user}","gists_url":"https://api.github.com/users/rwz/gists{/gist_id}","starred_url":"https://api.github.com/users/rwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwz/subscriptions","organizations_url":"https://api.github.com/users/rwz/orgs","repos_url":"https://api.github.com/users/rwz/repos","events_url":"https://api.github.com/users/rwz/events{/privacy}","received_events_url":"https://api.github.com/users/rwz/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T20:10:33Z","updated_at":"2015-04-03T20:10:33Z","body":"if you have any ideas about how to make it work, feel free to reopen this issue :)"}}