mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-30 01:18:47 -05:00
Merge pull request #180 from ErikMichelson/fix/trailingSlashRedirect
Fixed #179 (redirect loop with a trailing slash)
This commit is contained in:
commit
7f69ec5bca
2 changed files with 4 additions and 4 deletions
6
app.js
6
app.js
|
@ -126,9 +126,9 @@ app.use(i18n.init)
|
||||||
|
|
||||||
// routes without sessions
|
// routes without sessions
|
||||||
// static files
|
// static files
|
||||||
app.use('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime, index: false }))
|
app.use('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime, index: false, redirect: false }))
|
||||||
app.use('/docs', express.static(path.resolve(__dirname, config.docsPath), { maxAge: config.staticCacheTime }))
|
app.use('/docs', express.static(path.resolve(__dirname, config.docsPath), { maxAge: config.staticCacheTime, redirect: false }))
|
||||||
app.use('/uploads', express.static(path.resolve(__dirname, config.uploadsPath), { maxAge: config.staticCacheTime }))
|
app.use('/uploads', express.static(path.resolve(__dirname, config.uploadsPath), { maxAge: config.staticCacheTime, redirect: false }))
|
||||||
app.use('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime }))
|
app.use('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime }))
|
||||||
|
|
||||||
// session
|
// session
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = {
|
||||||
allowAnonymous: true,
|
allowAnonymous: true,
|
||||||
allowAnonymousEdits: false,
|
allowAnonymousEdits: false,
|
||||||
allowFreeURL: false,
|
allowFreeURL: false,
|
||||||
forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api'],
|
forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api', 'build', 'css', 'docs', 'fonts', 'js', 'uploads', 'vendor', 'views'],
|
||||||
defaultPermission: 'editable',
|
defaultPermission: 'editable',
|
||||||
dbURL: '',
|
dbURL: '',
|
||||||
db: {},
|
db: {},
|
||||||
|
|
Loading…
Reference in a new issue