@alleyboss/micropay-solana-x402-paywall 3.3.2 → 3.3.3
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/client/index.cjs +2 -2
- package/dist/client/index.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/client/index.cjs
CHANGED
|
@@ -178,8 +178,8 @@ function usePaywallResource({
|
|
|
178
178
|
}
|
|
179
179
|
const res = await fetch(url, { headers });
|
|
180
180
|
if (res.status === 402) {
|
|
181
|
-
const wwwAuth = res.headers.get("WWW-Authenticate");
|
|
182
|
-
console.log("[usePaywallResource] 402 Response.
|
|
181
|
+
const wwwAuth = res.headers.get("WWW-Authenticate") || res.headers.get("Payment-Required");
|
|
182
|
+
console.log("[usePaywallResource] 402 Response. Header:", wwwAuth);
|
|
183
183
|
if (wwwAuth) {
|
|
184
184
|
setPaymentHeader(wwwAuth);
|
|
185
185
|
try {
|
package/dist/client/index.js
CHANGED
|
@@ -176,8 +176,8 @@ function usePaywallResource({
|
|
|
176
176
|
}
|
|
177
177
|
const res = await fetch(url, { headers });
|
|
178
178
|
if (res.status === 402) {
|
|
179
|
-
const wwwAuth = res.headers.get("WWW-Authenticate");
|
|
180
|
-
console.log("[usePaywallResource] 402 Response.
|
|
179
|
+
const wwwAuth = res.headers.get("WWW-Authenticate") || res.headers.get("Payment-Required");
|
|
180
|
+
console.log("[usePaywallResource] 402 Response. Header:", wwwAuth);
|
|
181
181
|
if (wwwAuth) {
|
|
182
182
|
setPaymentHeader(wwwAuth);
|
|
183
183
|
try {
|
package/dist/index.cjs
CHANGED
|
@@ -190,8 +190,8 @@ function usePaywallResource({
|
|
|
190
190
|
}
|
|
191
191
|
const res = await fetch(url, { headers });
|
|
192
192
|
if (res.status === 402) {
|
|
193
|
-
const wwwAuth = res.headers.get("WWW-Authenticate");
|
|
194
|
-
console.log("[usePaywallResource] 402 Response.
|
|
193
|
+
const wwwAuth = res.headers.get("WWW-Authenticate") || res.headers.get("Payment-Required");
|
|
194
|
+
console.log("[usePaywallResource] 402 Response. Header:", wwwAuth);
|
|
195
195
|
if (wwwAuth) {
|
|
196
196
|
setPaymentHeader(wwwAuth);
|
|
197
197
|
try {
|
package/dist/index.js
CHANGED
|
@@ -184,8 +184,8 @@ function usePaywallResource({
|
|
|
184
184
|
}
|
|
185
185
|
const res = await fetch(url, { headers });
|
|
186
186
|
if (res.status === 402) {
|
|
187
|
-
const wwwAuth = res.headers.get("WWW-Authenticate");
|
|
188
|
-
console.log("[usePaywallResource] 402 Response.
|
|
187
|
+
const wwwAuth = res.headers.get("WWW-Authenticate") || res.headers.get("Payment-Required");
|
|
188
|
+
console.log("[usePaywallResource] 402 Response. Header:", wwwAuth);
|
|
189
189
|
if (wwwAuth) {
|
|
190
190
|
setPaymentHeader(wwwAuth);
|
|
191
191
|
try {
|
package/package.json
CHANGED