redirect /share to /share/, closes #3264

This commit is contained in:
zadam 2022-10-30 09:05:12 +01:00
parent 521d95021b
commit 38d6fddc61

View file

@ -109,7 +109,12 @@ function register(router) {
router.use('/share/canvas_share.js', express.static(path.join(__dirname, 'canvas_share.js')));
router.get(['/share', '/share/'], (req, res, next) => {
router.get('/share/', (req, res, next) => {
if (req.path.substr(-1) !== '/') {
res.redirect('../share/');
return;
}
shacaLoader.ensureLoad();
renderNote(shaca.shareRootNote, req, res);