{"action":"created","issue":{"url":"https://api.github.com/repos/skoczen/django-seo-js/issues/9","labels_url":"https://api.github.com/repos/skoczen/django-seo-js/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/skoczen/django-seo-js/issues/9/comments","events_url":"https://api.github.com/repos/skoczen/django-seo-js/issues/9/events","html_url":"https://github.com/skoczen/django-seo-js/issues/9","id":48392585,"number":9,"title":"301 redirects shouldn't be followed","user":{"login":"denisvlr","id":3200104,"avatar_url":"https://avatars.githubusercontent.com/u/3200104?v=3","gravatar_id":"","url":"https://api.github.com/users/denisvlr","html_url":"https://github.com/denisvlr","followers_url":"https://api.github.com/users/denisvlr/followers","following_url":"https://api.github.com/users/denisvlr/following{/other_user}","gists_url":"https://api.github.com/users/denisvlr/gists{/gist_id}","starred_url":"https://api.github.com/users/denisvlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisvlr/subscriptions","organizations_url":"https://api.github.com/users/denisvlr/orgs","repos_url":"https://api.github.com/users/denisvlr/repos","events_url":"https://api.github.com/users/denisvlr/events{/privacy}","received_events_url":"https://api.github.com/users/denisvlr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-11-11T14:58:13Z","updated_at":"2015-02-03T21:15:52Z","closed_at":null,"body":"I ran into an issue while trying to handle 301 redirects:\r\n\r\nWhen the prerender server (either self-hosted or on prerender.io) sends a 301 redirection, django-seo-js responds with a 200, it seems to follow redirections.\r\n\r\nIMHO this is not the expected behaviour, Google needs to know that the url has changed. I think the simple fix should be to add `allow_redirects=False` in the call to `request.get` :\r\n```\r\nr = self.requests.get(render_url, headers=headers, allow_redirects=False)\r\n```\r\nIs there any scenario where we want redirects to be followed? If so, we can add a global setting, otherwise this should be disabled by default.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/skoczen/django-seo-js/issues/comments/72736361","html_url":"https://github.com/skoczen/django-seo-js/issues/9#issuecomment-72736361","issue_url":"https://api.github.com/repos/skoczen/django-seo-js/issues/9","id":72736361,"user":{"login":"mattrobenolt","id":375744,"avatar_url":"https://avatars.githubusercontent.com/u/375744?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrobenolt","html_url":"https://github.com/mattrobenolt","followers_url":"https://api.github.com/users/mattrobenolt/followers","following_url":"https://api.github.com/users/mattrobenolt/following{/other_user}","gists_url":"https://api.github.com/users/mattrobenolt/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrobenolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrobenolt/subscriptions","organizations_url":"https://api.github.com/users/mattrobenolt/orgs","repos_url":"https://api.github.com/users/mattrobenolt/repos","events_url":"https://api.github.com/users/mattrobenolt/events{/privacy}","received_events_url":"https://api.github.com/users/mattrobenolt/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T21:15:52Z","updated_at":"2015-02-03T21:15:52Z","body":"+1"}}