wiki-server 0.26.0-rc.9 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/random_id.js +0 -1
- package/lib/server.js +4 -2
- package/package.json +1 -1
package/lib/random_id.js
CHANGED
package/lib/server.js
CHANGED
|
@@ -135,6 +135,8 @@ export default async argv => {
|
|
|
135
135
|
|
|
136
136
|
app.startOpts = argv
|
|
137
137
|
|
|
138
|
+
const wikiName = new URL(argv.url).hostname
|
|
139
|
+
|
|
138
140
|
const log = (...stuff) => {
|
|
139
141
|
if (argv.debug) console.log(stuff)
|
|
140
142
|
}
|
|
@@ -255,7 +257,7 @@ export default async argv => {
|
|
|
255
257
|
// use logger, at least in development, probably needs a param to configure (or turn off).
|
|
256
258
|
// use stream to direct to somewhere other than stdout.
|
|
257
259
|
logger.token('vhost', (req, res) => {
|
|
258
|
-
return colorString(
|
|
260
|
+
return colorString(wikiName)
|
|
259
261
|
})
|
|
260
262
|
app.use(logger(':vhost :method :url :status :res[content-length] - :response-time ms'))
|
|
261
263
|
app.use(cookieParser())
|
|
@@ -495,7 +497,7 @@ export default async argv => {
|
|
|
495
497
|
if (!err) {
|
|
496
498
|
res.sendFile(favLoc, { dotfiles: 'allow' })
|
|
497
499
|
} else {
|
|
498
|
-
res.sendFile(defaultFavLoc)
|
|
500
|
+
res.sendFile(defaultFavLoc, { dotfiles: 'allow' })
|
|
499
501
|
}
|
|
500
502
|
})
|
|
501
503
|
})
|