@paywalls-net/filter 1.3.4 → 1.3.5

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Client SDK for integrating paywalls.net bot filtering and authorization services into your server or CDN.",
4
4
  "author": "paywalls.net",
5
5
  "license": "MIT",
6
- "version": "1.3.4",
6
+ "version": "1.3.5",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
package/src/index.js CHANGED
@@ -193,14 +193,10 @@ async function checkAgentStatus(cfg, request) {
193
193
  };
194
194
  }
195
195
  let headers = getAllHeaders(request);
196
- const agentInfo = await classifyUserAgent(cfg, userAgent);
197
196
 
198
197
  const body = JSON.stringify({
199
198
  account_id: cfg.paywallsPublisherId,
200
- operator: agentInfo.operator,
201
- agent: agentInfo.agent,
202
- vat: agentInfo.vat,
203
- act: agentInfo.act,
199
+ user_agent: userAgent,
204
200
  token: token,
205
201
  headers: headers
206
202
  });
@@ -143,7 +143,7 @@ export async function classifyUserAgent(cfg, userAgent) {
143
143
  browser,
144
144
  os,
145
145
  vat: 'HUMAN',
146
- act: 'ACT-3',
146
+ act: 'ACT-2', // Unmatched UA with detected browser — medium confidence
147
147
  };
148
148
  // Cache the default classification
149
149
  classificationCache.set(userAgent, result);