How to use perimeterx-node-core - 2 common examples

To help you get started, we’ve selected a few perimeterx-node-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PerimeterX / perimeterx-node-express / lib / pxclient.js View on Github external
const PxClient = require('perimeterx-node-core').PxClient;

class PxExpressClient extends PxClient {
    init(config) {
        setInterval(() => {
            this.submitActivities(config);
        }, 1000);
    }
}

module.exports = PxExpressClient;
github PerimeterX / perimeterx-node-express / lib / pxenforcer.js View on Github external
constructor(params) {
        params.moduleVersion = MODULE_VERSION;
        const pxClient = new PxExpressClient();
        this.enforcer = new PxEnforcer(params, pxClient);

        if (this.enforcer.config.conf.DYNAMIC_CONFIGURATIONS) {
            setInterval(
                this.enforcer.config.confManager.loadData.bind(this.enforcer.config.confManager),
                this.enforcer.config.conf.CONFIGURATION_LOAD_INTERVAL
            );
        }

        this.middleware = this.newMiddleware();
    }

perimeterx-node-core

PerimeterX NodeJS shared core for various applications to monitor and block traffic according to PerimeterX risk score

MIT
Latest version published 10 months ago

Package Health Score

64 / 100
Full package analysis