@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 +1 -1
- package/src/index.js +1 -5
- package/src/user-agent-classification.js +1 -1
package/package.json
CHANGED
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
|
-
|
|
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-
|
|
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);
|