@fedify/fastify 2.1.0-dev.513 → 2.1.0-dev.523

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/dist/index.cjs CHANGED
@@ -63,7 +63,7 @@ const fedifyPluginCore = (fastify, options) => {
63
63
  const contextData = await contextDataFactory(request);
64
64
  const response = await federation.fetch(webRequest, {
65
65
  contextData,
66
- onNotAcceptable: () => defaultNotAcceptableResponse,
66
+ onNotAcceptable: createDefaultNotAcceptableResponse,
67
67
  onNotFound: () => dummyNotFoundResponse,
68
68
  ...errorHandlers
69
69
  });
@@ -77,7 +77,7 @@ const fedifyPlugin = (0, fastify_plugin.default)(fedifyPluginCore, {
77
77
  fastify: "5.x"
78
78
  });
79
79
  const dummyNotFoundResponse = new Response("", { status: 404 });
80
- const defaultNotAcceptableResponse = new Response("Not Acceptable", {
80
+ const createDefaultNotAcceptableResponse = () => new Response("Not Acceptable", {
81
81
  status: 406,
82
82
  headers: {
83
83
  "Content-Type": "text/plain",
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ const fedifyPluginCore = (fastify, options) => {
39
39
  const contextData = await contextDataFactory(request);
40
40
  const response = await federation.fetch(webRequest, {
41
41
  contextData,
42
- onNotAcceptable: () => defaultNotAcceptableResponse,
42
+ onNotAcceptable: createDefaultNotAcceptableResponse,
43
43
  onNotFound: () => dummyNotFoundResponse,
44
44
  ...errorHandlers
45
45
  });
@@ -53,7 +53,7 @@ const fedifyPlugin = fp(fedifyPluginCore, {
53
53
  fastify: "5.x"
54
54
  });
55
55
  const dummyNotFoundResponse = new Response("", { status: 404 });
56
- const defaultNotAcceptableResponse = new Response("Not Acceptable", {
56
+ const createDefaultNotAcceptableResponse = () => new Response("Not Acceptable", {
57
57
  status: 406,
58
58
  headers: {
59
59
  "Content-Type": "text/plain",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fastify",
3
- "version": "2.1.0-dev.513+f5543fca",
3
+ "version": "2.1.0-dev.523+150998a5",
4
4
  "description": "Integrate Fedify with Fastify",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "peerDependencies": {
50
50
  "fastify": "^5.2.0",
51
- "@fedify/fedify": "^2.1.0-dev.513+f5543fca"
51
+ "@fedify/fedify": "^2.1.0-dev.523+150998a5"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^22.17.0",