@openreceive/fastify 0.4.18 → 0.4.19
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.js +2 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -33,10 +33,11 @@ function openReceiveFastify(fastify, options, done) {
|
|
|
33
33
|
...createProxyRateLimitingConfig(handlerOptions.rateLimiting, trustProxyIpHeader)
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
const ownsScope = effectivePrefix.prefix === "/";
|
|
36
37
|
fastify.all("/*", async (request, reply) => {
|
|
37
38
|
const relativeUrl = stripInstancePrefix(request.raw.url ?? "/", instancePrefix);
|
|
38
39
|
const pathname = relativeUrl.split("?")[0];
|
|
39
|
-
if (!isUnderPrefix(pathname, handler.prefix) && reply.callNotFound !== void 0) {
|
|
40
|
+
if (!ownsScope && !isUnderPrefix(pathname, handler.prefix) && reply.callNotFound !== void 0) {
|
|
40
41
|
return reply.callNotFound();
|
|
41
42
|
}
|
|
42
43
|
const response = await respond(handler, request, relativeUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openreceive/fastify",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "Accept Bitcoin Lightning payments in Fastify with your own wallet and optional USDT, USDC, SOL and ETH swaps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@openreceive/http": "0.4.
|
|
20
|
+
"@openreceive/http": "0.4.19"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"fastify": "^4.0.0 || ^5.0.0"
|