{"action":"created","issue":{"url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97","repository_url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate","labels_url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97/comments","events_url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97/events","html_url":"https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97","id":155138557,"number":97,"title":"Error message when hosting","user":{"login":"omidkrad","id":767147,"avatar_url":"https://avatars.githubusercontent.com/u/767147?v=3","gravatar_id":"","url":"https://api.github.com/users/omidkrad","html_url":"https://github.com/omidkrad","followers_url":"https://api.github.com/users/omidkrad/followers","following_url":"https://api.github.com/users/omidkrad/following{/other_user}","gists_url":"https://api.github.com/users/omidkrad/gists{/gist_id}","starred_url":"https://api.github.com/users/omidkrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omidkrad/subscriptions","organizations_url":"https://api.github.com/users/omidkrad/orgs","repos_url":"https://api.github.com/users/omidkrad/repos","events_url":"https://api.github.com/users/omidkrad/events{/privacy}","received_events_url":"https://api.github.com/users/omidkrad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-16T22:40:05Z","updated_at":"2016-05-20T17:03:29Z","closed_at":null,"body":"Hi, I use MVC Boilerplate and it works fine when running the app locally. However, when the app is hosted, I get the following error message:\r\n\r\n> Mixed Content: The page at 'https://mydomain.com/api/summary?id=...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://mydomain.com/error/internalservererror/?500;https://mydomain.com/api/summary?id=...'.\r\nThis request has been blocked; the content must be served over HTTPS.\r\nXHR failed loading: GET \"https://mydomain.com/api/summary?id=...\".\r\n\r\nWe have a valid SSL and when the location is HTTPS, the JS code makes a JQuery.ajax call with url set to `/api/summary?id=...`. It looks like there is a server error and the MVC boilerplate is trying to redirect to the error page but with the wrong schema. The *Mixed Content* error seems to be produced in the browser. Do you have any idea why this is happening? I have to try to debug why it's failing on the server but the same web api added to a regular MVC template does not produce the error. I also tried to disable all boilerplate security filters to no avail. Thanks!"},"comment":{"url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/comments/220662186","html_url":"https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97#issuecomment-220662186","issue_url":"https://api.github.com/repos/RehanSaeed/ASP.NET-MVC-Boilerplate/issues/97","id":220662186,"user":{"login":"RehanSaeed","id":2270364,"avatar_url":"https://avatars.githubusercontent.com/u/2270364?v=3","gravatar_id":"","url":"https://api.github.com/users/RehanSaeed","html_url":"https://github.com/RehanSaeed","followers_url":"https://api.github.com/users/RehanSaeed/followers","following_url":"https://api.github.com/users/RehanSaeed/following{/other_user}","gists_url":"https://api.github.com/users/RehanSaeed/gists{/gist_id}","starred_url":"https://api.github.com/users/RehanSaeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RehanSaeed/subscriptions","organizations_url":"https://api.github.com/users/RehanSaeed/orgs","repos_url":"https://api.github.com/users/RehanSaeed/repos","events_url":"https://api.github.com/users/RehanSaeed/events{/privacy}","received_events_url":"https://api.github.com/users/RehanSaeed/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T17:03:29Z","updated_at":"2016-05-20T17:03:29Z","body":"The `RedirectToCanonicalUrlAttribute` and `RequireHttpsAttribute` cause redirects for SEO and security purposes. You can read comments about what they do.\r\n\r\nAre you trying to build an API and Website in one? I wouldn't recomend that as it's difficult to separate the two e.g.\r\n\r\n1. API's have different error pages. You don't want to return a web page when there is a 500 internal server error.\r\n2. The `RedirectToCanonicalUrlAttribute` may mess things up if you require case sensitive URL's but you can use the `NoLowercaseQueryStringAttribute` or `NoTrailingSlashAttribute` to workaround some of this."}}
{"actor":{"display_login":"RehanSaeed"}}