Skip to content

Commit

Permalink
Skip: Redirect to 404 if user tries to navigate to faulty subfolder (…
Browse files Browse the repository at this point in the history
…merge commit)

Merge branch 'bugfix/faulty-subfolder-404-redirect' into 'main'
* Redirect to 404 if user tries to navigate to faulty subfolder

Closes #1198
See merge request https://gitlab.ci.csc.fi/sds-dev/sd-connect/swift-browser-ui/-/merge_requests/257

Approved-by: Hang Le <[email protected]>
Co-authored-by: Emmi Rehn <[email protected]>
Merged by Hang Le <[email protected]>
  • Loading branch information
Hang Le committed Jan 31, 2024
2 parents 3800c7d + d89fcad commit 87a57b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- (GL #1187) Trim whitespace from container names before creation
- (GL #1182) Prevent folder icons in table from shrinking
- (GL #1198) Faulty subfolders in route should lead to status 404

### Added
- (GL #1185) Add Accessibility page (English version)
Expand Down
5 changes: 5 additions & 0 deletions swift_browser_ui_frontend/src/entries/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,4 +601,9 @@ app.config.warnHandler = function (msg, vm, info) {
if (DEV) console.log("Vue warning: ", msg, vm, info);
};

router.afterEach((to) => {
if (!to.name) {
window.location.pathname = "/notfound";
}
});
router.isReady().then(() => app.mount("#app"));

0 comments on commit 87a57b3

Please sign in to comment.