{"action":"created","issue":{"url":"https://api.github.com/repos/palanik/CorsSlim/issues/7","labels_url":"https://api.github.com/repos/palanik/CorsSlim/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/palanik/CorsSlim/issues/7/comments","events_url":"https://api.github.com/repos/palanik/CorsSlim/issues/7/events","html_url":"https://github.com/palanik/CorsSlim/issues/7","id":69626927,"number":7,"title":"301 Permanent Moved on heroku","user":{"login":"marvinosswald","id":1621844,"avatar_url":"https://avatars.githubusercontent.com/u/1621844?v=3","gravatar_id":"","url":"https://api.github.com/users/marvinosswald","html_url":"https://github.com/marvinosswald","followers_url":"https://api.github.com/users/marvinosswald/followers","following_url":"https://api.github.com/users/marvinosswald/following{/other_user}","gists_url":"https://api.github.com/users/marvinosswald/gists{/gist_id}","starred_url":"https://api.github.com/users/marvinosswald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marvinosswald/subscriptions","organizations_url":"https://api.github.com/users/marvinosswald/orgs","repos_url":"https://api.github.com/users/marvinosswald/repos","events_url":"https://api.github.com/users/marvinosswald/events{/privacy}","received_events_url":"https://api.github.com/users/marvinosswald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-20T16:35:18Z","updated_at":"2015-04-21T03:40:28Z","closed_at":null,"body":"Can't figure why..  I use CorsSlim with default Settings and when I try to access it from another heroku repo I keep getting an `301 Permanent Moved` \r\nAny Ideas ?\r\n\r\nEDIT: And If I try the same request with postman it works like charm...\r\n\r\nrequest:\r\n\r\n        Host: lavacal-api.heroku.com\r\n        User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0\r\n        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n        Accept-Language: de,en-US;q=0.7,en;q=0.3\r\n        Accept-Encoding: gzip, deflate\r\n        Origin: http://lavacal.herokuapp.com\r\n        Access-Control-Request-Method: GET\r\n        Access-Control-Request-Headers: apikey\r\n        Connection: keep-alive\r\n\r\nresponse:\r\n\r\n        Connection: keep-alive\r\n        Content-Length: 0\r\n        Date: Mon, 20 Apr 2015 16:30:41 GMT\r\n        Location: http://lavacal-api.herokuapp.com/api/v1/events\r\n        Server: Cowboy"},"comment":{"url":"https://api.github.com/repos/palanik/CorsSlim/issues/comments/94629067","html_url":"https://github.com/palanik/CorsSlim/issues/7#issuecomment-94629067","issue_url":"https://api.github.com/repos/palanik/CorsSlim/issues/7","id":94629067,"user":{"login":"palanik","id":1656913,"avatar_url":"https://avatars.githubusercontent.com/u/1656913?v=3","gravatar_id":"","url":"https://api.github.com/users/palanik","html_url":"https://github.com/palanik","followers_url":"https://api.github.com/users/palanik/followers","following_url":"https://api.github.com/users/palanik/following{/other_user}","gists_url":"https://api.github.com/users/palanik/gists{/gist_id}","starred_url":"https://api.github.com/users/palanik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palanik/subscriptions","organizations_url":"https://api.github.com/users/palanik/orgs","repos_url":"https://api.github.com/users/palanik/repos","events_url":"https://api.github.com/users/palanik/events{/privacy}","received_events_url":"https://api.github.com/users/palanik/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T03:40:28Z","updated_at":"2015-04-21T03:40:28Z","body":"@max is correct. heroku.com url sends a 301 redirect response to herokuapp.com.\r\n```\r\n$ curl -I 'http://lavacal-api.heroku.com/api/v1/events'\r\nHTTP/1.1 301 Moved Permanently\r\nConnection: keep-alive\r\nServer: Cowboy\r\nDate: Tue, 21 Apr 2015 03:40:03 GMT\r\nContent-Length: 0\r\nLocation: http://lavacal-api.herokuapp.com/api/v1/events\r\n```\r\nThanks @max.\r\n\r\nI also tried with a sample page making ajax requests to `http://lavacal-api.herokuapp.com/api/v1/events` and worked flawlessly with correct CORS headers.\r\n\r\nThe reason it was working with postman was, by default postman is set to automatically follow redirects. You can change this behavior, in the settings. (Settings > Settings >Automatically follow redirects). You also need Interceptor to make this work.\r\n\r\nHTH.\r\n - P"}}