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 CHANGED
@@ -11,4 +11,3 @@
11
11
  // chars that defaults to 16 and returns a random id.
12
12
 
13
13
  export default (chars = 16) => [...Array(chars)].map(() => Math.floor(Math.random() * 16).toString(16)).join('')
14
-
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(req.hostname)
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
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wiki-server",
3
3
  "description": "A Federated Wiki Server",
4
- "version": "0.26.0-rc.9",
4
+ "version": "0.26.0",
5
5
  "type": "module",
6
6
  "author": {
7
7
  "name": "Ward Cunningham",