@alleyboss/micropay-solana-x402-paywall 3.3.5 → 3.3.6
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/next/index.cjs +3 -0
- package/dist/next/index.js +3 -0
- package/package.json +1 -1
package/dist/next/index.cjs
CHANGED
|
@@ -245,6 +245,9 @@ function createX402Middleware(config) {
|
|
|
245
245
|
return async (req, ctx) => {
|
|
246
246
|
const compatibleReq = new Proxy(req, {
|
|
247
247
|
get(target, prop) {
|
|
248
|
+
if (prop === "url") {
|
|
249
|
+
return target.nextUrl?.pathname || target.url;
|
|
250
|
+
}
|
|
248
251
|
if (prop === "headers") {
|
|
249
252
|
const headers = target.headers;
|
|
250
253
|
return new Proxy(headers, {
|
package/dist/next/index.js
CHANGED
|
@@ -244,6 +244,9 @@ function createX402Middleware(config) {
|
|
|
244
244
|
return async (req, ctx) => {
|
|
245
245
|
const compatibleReq = new Proxy(req, {
|
|
246
246
|
get(target, prop) {
|
|
247
|
+
if (prop === "url") {
|
|
248
|
+
return target.nextUrl?.pathname || target.url;
|
|
249
|
+
}
|
|
247
250
|
if (prop === "headers") {
|
|
248
251
|
const headers = target.headers;
|
|
249
252
|
return new Proxy(headers, {
|
package/package.json
CHANGED