@paywalls-net/filter 1.2.3 → 1.2.4
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 +10 -8
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -275,15 +275,17 @@ async function cloudflare(config = null) {
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
|
|
278
|
-
async function fastly(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
278
|
+
async function fastly() {
|
|
279
|
+
|
|
280
|
+
return async function handle(request, config, ctx) {
|
|
281
|
+
const paywallsConfig = {
|
|
282
|
+
paywallsAPIHost: config.get('PAYWALLS_CLOUD_API_HOST') || PAYWALLS_CLOUD_API_HOST,
|
|
283
|
+
paywallsAPIKey: config.get('PAYWALLS_API_KEY'),
|
|
284
|
+
paywallsPublisherId: config.get('PAYWALLS_PUBLISHER_ID')
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
await loadAgentPatterns(paywallsConfig);
|
|
285
288
|
|
|
286
|
-
return async function handle(request) {
|
|
287
289
|
if (await isRecognizedBot(paywallsConfig, request)) {
|
|
288
290
|
const authz = await checkAgentStatus(paywallsConfig, request);
|
|
289
291
|
|