@netacea/f5
is a package designed to add Netacea functionality to F5.
Contact one of the Netacea support teams for the TCL code to run. Code examples are below.
Run the following command to install the netacea worker
npm i @netacea/f5 --save
Require (javascript) or import (typescript) the worker
// JAVASCRIPT:
const NetaceaF5 = require('@netacea/f5').default
// TYPESCRIPT:
import NetaceaF5 from '@netacea/f5'
Then declare a variable for the worker and register the handlers.
const worker = new NetaceaF5({
apiKey: 'your-api-key',
secretKey: 'your-secret-key'
})
netacea.registerMitigateHandler(ilx)
netacea.registerIngestHandler(ilx)
It's best security practice to not commit your apiKey
and secretKey
to any repository.
Example Typescript:
import NetaceaF5, { F5ConstructorArgs, IlxServer } from '@netacea/f5'
import * as NetaceaConfig from './NetaceaConfig.json'
const f5 = require('f5-nodejs')
const ilx: IlxServer = new f5.ILXServer()
const netacea = new NetaceaF5(NetaceaConfig as F5ConstructorArgs)
netacea.registerMitigateHandler(ilx)
netacea.registerIngestHandler(ilx)
ilx.listen()
Example Javascript:
const NetaceaF5 = require('@netacea/f5').default
const worker = new NetaceaF5({
apiKey: 'your-api-key',
secretKey: 'your-secret-key'
})
const NetaceaConfig = require('./NetaceaConfig.json')
const f5 = require('f5-nodejs')
const ilx = new f5.ILXServer()
const netacea = new NetaceaF5(config)
netacea.registerMitigateHandler(ilx)
netacea.registerIngestHandler(ilx)
npm i @netacea/f5@latest --save
This will update the netacea module to the latest version.