{"action":"created","issue":{"url":"https://api.github.com/repos/lotus/router/issues/57","labels_url":"https://api.github.com/repos/lotus/router/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/lotus/router/issues/57/comments","events_url":"https://api.github.com/repos/lotus/router/issues/57/events","html_url":"https://github.com/lotus/router/pull/57","id":85102985,"number":57,"title":"Added force_ssl option","user":{"login":"AlfonsoUceda","id":925961,"avatar_url":"https://avatars.githubusercontent.com/u/925961?v=3","gravatar_id":"","url":"https://api.github.com/users/AlfonsoUceda","html_url":"https://github.com/AlfonsoUceda","followers_url":"https://api.github.com/users/AlfonsoUceda/followers","following_url":"https://api.github.com/users/AlfonsoUceda/following{/other_user}","gists_url":"https://api.github.com/users/AlfonsoUceda/gists{/gist_id}","starred_url":"https://api.github.com/users/AlfonsoUceda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlfonsoUceda/subscriptions","organizations_url":"https://api.github.com/users/AlfonsoUceda/orgs","repos_url":"https://api.github.com/users/AlfonsoUceda/repos","events_url":"https://api.github.com/users/AlfonsoUceda/events{/privacy}","received_events_url":"https://api.github.com/users/AlfonsoUceda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lotus/router/labels/feature","name":"feature","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lotus/router/milestones/5","html_url":"https://github.com/lotus/router/milestones/v0.4.1","labels_url":"https://api.github.com/repos/lotus/router/milestones/5/labels","id":1146846,"number":5,"title":"v0.4.1","description":"","creator":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-06-03T09:48:55Z","updated_at":"2015-06-09T16:45:55Z","due_on":"2015-06-22T22:00:00Z","closed_at":null},"comments":3,"created_at":"2015-06-04T13:38:08Z","updated_at":"2015-06-09T17:05:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lotus/router/pulls/57","html_url":"https://github.com/lotus/router/pull/57","diff_url":"https://github.com/lotus/router/pull/57.diff","patch_url":"https://github.com/lotus/router/pull/57.patch"},"body":"Resolves #56 \r\n\r\nNow you can force ssl in your router:\r\n```ruby\r\n# notice scheme is http\r\n@router = Lotus::Router.new(force_ssl: true) do\r\n  get '/', to: 'home#index', as: :root\r\nend\r\n```\r\nif you call to your app's home then `@router` return 301 status and Location `https://localhost/`"},"comment":{"url":"https://api.github.com/repos/lotus/router/issues/comments/110435190","html_url":"https://github.com/lotus/router/pull/57#issuecomment-110435190","issue_url":"https://api.github.com/repos/lotus/router/issues/57","id":110435190,"user":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T17:05:27Z","updated_at":"2015-06-09T17:05:27Z","body":"@AlfonsoUceda The current implementation always force SSL if `force_ssl: true` is given.\r\n\r\nThe problem is that when an incoming request that already uses SSL (scheme `https`), is redirected, which is wrong. In this case we should let the request in, otherwise we'll create an infinite redirect problem.\r\n\r\n"}}