{"action":"created","issue":{"url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/63","repository_url":"https://api.github.com/repos/ONSdigital/respondent-home-ui","labels_url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/63/comments","events_url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/63/events","html_url":"https://github.com/ONSdigital/respondent-home-ui/pull/63","id":371483792,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzOTE5Nzgx","number":63,"title":"BUG201: Redirect prefixed paths missing a trailing slash to index","user":{"login":"jcox-dev","id":28348457,"node_id":"MDQ6VXNlcjI4MzQ4NDU3","avatar_url":"https://avatars0.githubusercontent.com/u/28348457?v=4","gravatar_id":"","url":"https://api.github.com/users/jcox-dev","html_url":"https://github.com/jcox-dev","followers_url":"https://api.github.com/users/jcox-dev/followers","following_url":"https://api.github.com/users/jcox-dev/following{/other_user}","gists_url":"https://api.github.com/users/jcox-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jcox-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcox-dev/subscriptions","organizations_url":"https://api.github.com/users/jcox-dev/orgs","repos_url":"https://api.github.com/users/jcox-dev/repos","events_url":"https://api.github.com/users/jcox-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jcox-dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-18T11:26:03Z","updated_at":"2018-10-18T11:28:27Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/pulls/63","html_url":"https://github.com/ONSdigital/respondent-home-ui/pull/63","diff_url":"https://github.com/ONSdigital/respondent-home-ui/pull/63.diff","patch_url":"https://github.com/ONSdigital/respondent-home-ui/pull/63.patch"},"body":"# Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nFollowing the [removal of the static files](https://github.com/ONSdigital/respondent-home-ui/pull/59), a bug was introduced whereby an incomplete prefixed path would not resolve to index.\r\n\r\nThis manifested because previously a prefixed path such as `/mystudy` would go to the static root directory -> which we made inaccessible -> app raises 403 (forbidden) -> error handler redirects to index.\r\n\r\n# What has changed\r\n<!--- What code changes has been made -->\r\n<!--- Has there been any refactoring -->\r\n<!--- What tests have been written -->\r\n- Add a custom error handler for paths not found to check for an incomplete index route and redirect if possible (301)\r\n- Reinstate unit test for redirecting to index\r\n\r\n# How to test?\r\n<!--- Describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. -->\r\n<!--- Are there any automated tests that mean changes don't need to be manually changed -->\r\n- run the unit tests with `make unittests`\r\n- start the server with `make run` and check routing with and without a URL_PATH_PREFIX environment variable\r\n"},"comment":{"url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/comments/430973313","html_url":"https://github.com/ONSdigital/respondent-home-ui/pull/63#issuecomment-430973313","issue_url":"https://api.github.com/repos/ONSdigital/respondent-home-ui/issues/63","id":430973313,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDk3MzMxMw==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-10-18T11:28:27Z","updated_at":"2018-10-18T11:28:27Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=h1) Report\n> Merging [#63](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=desc) into [master](https://codecov.io/gh/ONSdigital/respondent-home-ui/commit/69d2ba34ebd931a9d024e2bedb60e7f4b0c8d4ce?src=pr&el=desc) will **decrease** coverage by `0.18%`.\n> The diff coverage is `83.33%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63/graphs/tree.svg?width=650&token=0sqcEXF8YL&height=150&src=pr)](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=tree)\n\n```diff\n@@            Coverage Diff             @@\n##           master      #63      +/-   ##\n==========================================\n- Coverage    98.8%   98.62%   -0.19%     \n==========================================\n  Files          13       13              \n  Lines         504      510       +6     \n==========================================\n+ Hits          498      503       +5     \n- Misses          6        7       +1\n```\n\n\n| [Impacted Files](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [app/error\\_handlers.py](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63/diff?src=pr&el=tree#diff-YXBwL2Vycm9yX2hhbmRsZXJzLnB5) | `96.07% <83.33%> (-1.7%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=footer). Last update [69d2ba3...b3764f9](https://codecov.io/gh/ONSdigital/respondent-home-ui/pull/63?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}