{"action":"created","issue":{"url":"https://api.github.com/repos/octobercms/october/issues/1936","repository_url":"https://api.github.com/repos/octobercms/october","labels_url":"https://api.github.com/repos/octobercms/october/issues/1936/labels{/name}","comments_url":"https://api.github.com/repos/octobercms/october/issues/1936/comments","events_url":"https://api.github.com/repos/octobercms/october/issues/1936/events","html_url":"https://github.com/octobercms/october/issues/1936","id":148343900,"number":1936,"title":"How provide a convenient mechanism for filtering HTTP requests?","user":{"login":"ahlechandre","id":7119058,"avatar_url":"https://avatars.githubusercontent.com/u/7119058?v=3","gravatar_id":"","url":"https://api.github.com/users/ahlechandre","html_url":"https://github.com/ahlechandre","followers_url":"https://api.github.com/users/ahlechandre/followers","following_url":"https://api.github.com/users/ahlechandre/following{/other_user}","gists_url":"https://api.github.com/users/ahlechandre/gists{/gist_id}","starred_url":"https://api.github.com/users/ahlechandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahlechandre/subscriptions","organizations_url":"https://api.github.com/users/ahlechandre/orgs","repos_url":"https://api.github.com/users/ahlechandre/repos","events_url":"https://api.github.com/users/ahlechandre/events{/privacy}","received_events_url":"https://api.github.com/users/ahlechandre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-14T12:20:33Z","updated_at":"2016-04-14T18:15:33Z","closed_at":null,"body":"How I can provide a convenient mechanism for filtering HTTP requests entering my application?\r\n\r\nThe correct would be filter the requests for each route in page `onStart()` function or using routes/middlewares?"},"comment":{"url":"https://api.github.com/repos/octobercms/october/issues/comments/210083961","html_url":"https://github.com/octobercms/october/issues/1936#issuecomment-210083961","issue_url":"https://api.github.com/repos/octobercms/october/issues/1936","id":210083961,"user":{"login":"ahlechandre","id":7119058,"avatar_url":"https://avatars.githubusercontent.com/u/7119058?v=3","gravatar_id":"","url":"https://api.github.com/users/ahlechandre","html_url":"https://github.com/ahlechandre","followers_url":"https://api.github.com/users/ahlechandre/followers","following_url":"https://api.github.com/users/ahlechandre/following{/other_user}","gists_url":"https://api.github.com/users/ahlechandre/gists{/gist_id}","starred_url":"https://api.github.com/users/ahlechandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahlechandre/subscriptions","organizations_url":"https://api.github.com/users/ahlechandre/orgs","repos_url":"https://api.github.com/users/ahlechandre/repos","events_url":"https://api.github.com/users/ahlechandre/events{/privacy}","received_events_url":"https://api.github.com/users/ahlechandre/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T18:15:33Z","updated_at":"2016-04-14T18:15:33Z","body":"@tobias-kuendig This Middleware will be called and filter all requests entering the application, right? What I need is delegate a Middleware for each route (or groups). For example, using `routes.php` in plugin folder:\r\n\r\n```php\r\nRoute::get('/dashboard', ['middleware' => 'auth', function () {\r\n  // This prevents the CMS to render \"/dashboard\" page.\r\n  // What I need to return here in success cases?\r\n}])\r\n```"}}