diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e44b61f..112ae276d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +- Fixed: Security exception when accessing "/" via a + ``react-router`` ```` is now avoided. + ([#521](https://github.com/MoOx/phenomic/issues/521) - @MoOx) + # 0.14.1 - 2016-06-12 - Fixed: explicit update of ``react-router@^2.3.0`` peer dependency diff --git a/src/client/index.js b/src/client/index.js index f689075d4..008c1b5d4 100644 --- a/src/client/index.js +++ b/src/client/index.js @@ -12,7 +12,9 @@ import PhenomicContextProvider from "../ContextProvider" export const browserHistory = typeof window !== "undefined" // just for node testing ? useRouterHistory(createBrowserHistory)({ - basename: process.env.PHENOMIC_USER_PATHNAME, + // basename don't like having a trailing slash + // https://github.com/reactjs/react-router/issues/3184 + basename: process.env.PHENOMIC_USER_PATHNAME.replace(/\/$/, ""), }) : null