waibu 2.8.2 → 2.9.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/index.js CHANGED
@@ -8,7 +8,6 @@ import sensible from '@fastify/sensible'
8
8
  import underPressure from '@fastify/under-pressure'
9
9
  import handleForward from './lib/handle-forward.js'
10
10
  import handleRedirect from './lib/handle-redirect.js'
11
- import handleFavicon from './lib/handle-favicon.js'
12
11
  import handleError from './lib/handle-error.js'
13
12
  import handleNotFound from './lib/handle-not-found.js'
14
13
  import handleHome from './lib/handle-home.js'
@@ -125,7 +124,6 @@ async function factory (pkgName) {
125
124
  fileSize: 10485760
126
125
  }
127
126
  },
128
- favicon: false,
129
127
  underPressure: false,
130
128
  forwardOpts: {
131
129
  disableRequestLogging: true,
@@ -194,7 +192,6 @@ async function factory (pkgName) {
194
192
  await runHook('waibu:afterCreateContext', this.instance)
195
193
  await this.instance.register(sensible)
196
194
  if (cfg.underPressure) await this.instance.register(underPressure)
197
- await handleFavicon.call(this)
198
195
  await handleRedirect.call(this)
199
196
  await handleForward.call(this)
200
197
  await handleAppHook.call(this)
package/logo.png CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "2.8.2",
3
+ "version": "2.9.0",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-07
4
+
5
+ - [2.9.0] Change logo
6
+ - [2.9.0] Remove favicon handler
7
+
3
8
  ## 2026-03-06
4
9
 
5
10
  - [2.8.1] Bug fix on ```req.body``` parsing
@@ -1,20 +0,0 @@
1
- import path from 'path'
2
- import handleDownload from './handle-download.js'
3
-
4
- async function handleFavicon () {
5
- const { getPluginFile } = this.app.bajo
6
- let file
7
- let ext = '.ico'
8
- if (this.config.favicon) {
9
- file = getPluginFile(this.config.favicon === true ? 'main:/favicon.ico' : this.config.favicon)
10
- ext = path.extname(file)
11
- }
12
- const me = this
13
- this.instance.get(`/favicon${ext}`, async function (req, reply) {
14
- if (!file) return reply.code(404).send()
15
- reply.header('cache-control', 'max-age=86400')
16
- return await handleDownload.call(me, file, req, reply)
17
- })
18
- }
19
-
20
- export default handleFavicon