@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.
@@ -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, {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alleyboss/micropay-solana-x402-paywall",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "description": "Production-ready Solana micropayments library wrapper for official x402 SDK",
5
5
  "author": "AlleyBoss",
6
6
  "license": "MIT",