{"action":"created","issue":{"url":"https://api.github.com/repos/fusionbox/django-widgy/issues/233","labels_url":"https://api.github.com/repos/fusionbox/django-widgy/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/fusionbox/django-widgy/issues/233/comments","events_url":"https://api.github.com/repos/fusionbox/django-widgy/issues/233/events","html_url":"https://github.com/fusionbox/django-widgy/pull/233","id":37909559,"number":233,"title":"widgy_mezzanine preview doesn't work with default nginx config","user":{"login":"gavinwahl","id":421710,"avatar_url":"https://avatars.githubusercontent.com/u/421710?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinwahl","html_url":"https://github.com/gavinwahl","followers_url":"https://api.github.com/users/gavinwahl/followers","following_url":"https://api.github.com/users/gavinwahl/following{/other_user}","gists_url":"https://api.github.com/users/gavinwahl/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinwahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinwahl/subscriptions","organizations_url":"https://api.github.com/users/gavinwahl/orgs","repos_url":"https://api.github.com/users/gavinwahl/repos","events_url":"https://api.github.com/users/gavinwahl/events{/privacy}","received_events_url":"https://api.github.com/users/gavinwahl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-07-15T18:03:55Z","updated_at":"2015-03-04T17:59:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fusionbox/django-widgy/pulls/233","html_url":"https://github.com/fusionbox/django-widgy/pull/233","diff_url":"https://github.com/fusionbox/django-widgy/pull/233.diff","patch_url":"https://github.com/fusionbox/django-widgy/pull/233.patch"},"body":"nginx has a feature where it merges slashes[0] in a URL, so for example, a URL that looks like:\r\n\r\n```\r\n//scripts/script.php\r\n```\r\n\r\nwould be normalized to:\r\n\r\n```\r\n/scripts/script.php\r\n```\r\n\r\nThis is great, except no it's not.  Especially because in widgy, we tend to have URLs that look like:\r\n\r\n```\r\nhttp://demo.wid.gy/widgy/preview/1///\r\n```\r\n\r\nbut that nginx is passing through as:\r\n\r\n```\r\nhttp://demo.wid.gy/widgy/preview/1/\r\n```\r\n\r\nThe behavior in nginx can be turned off with\r\n\r\n```\r\nmerge_slashes off;\r\n```\r\n\r\nBut it seems bad to require special configuration of nginx for widgy to work. Alternatively, we can urlencode the slug in the url.\r\n\r\n\r\n[0] http://nginx.org/en/docs/http/ngx_http_core_module.html#merge_slashes\r\n\r\nreported by @rockymeza "},"comment":{"url":"https://api.github.com/repos/fusionbox/django-widgy/issues/comments/77210223","html_url":"https://github.com/fusionbox/django-widgy/pull/233#issuecomment-77210223","issue_url":"https://api.github.com/repos/fusionbox/django-widgy/issues/233","id":77210223,"user":{"login":"gavinwahl","id":421710,"avatar_url":"https://avatars.githubusercontent.com/u/421710?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinwahl","html_url":"https://github.com/gavinwahl","followers_url":"https://api.github.com/users/gavinwahl/followers","following_url":"https://api.github.com/users/gavinwahl/following{/other_user}","gists_url":"https://api.github.com/users/gavinwahl/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinwahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinwahl/subscriptions","organizations_url":"https://api.github.com/users/gavinwahl/orgs","repos_url":"https://api.github.com/users/gavinwahl/repos","events_url":"https://api.github.com/users/gavinwahl/events{/privacy}","received_events_url":"https://api.github.com/users/gavinwahl/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T17:59:08Z","updated_at":"2015-03-04T17:59:08Z","body":"Fixed and converted to a pull request"}}