@akamaistro/rules
v1.2.0
Published
Generate npm packages of Typescript interfaces for Akamai rule behaviors and criteria.
Downloads
150
Keywords
Readme
akamaistro-rules
Generate npm packages of Typescript interfaces for Akamai rule behaviors and criteria.
Package usage
- Install package
npm i akamaistro-rules
- Import rule items from specific rule format like
v2017-06-19
orlatest
(recommended) - Use type annotations and
satisfies
operator inline to enforce types
import { Rule, Path, ModifyOutgoingRequestHeader } from 'akamaistro/latest';
const rule: Rule = {
name: 'Add header on some-path',
criteria: [
{
name: 'path',
options: { matchOperator: 'MATCHES_ONE_OF', values: '/some-path*' },
} satisfies Path,
],
behaviors: [
{
name: 'modifyOutgoingRequestHeader',
options: {
action: 'ADD',
customHeaderName: 'x-header-name',
headerValue: 'some-value',
},
} satisfies ModifyOutgoingRequestHeader,
],
};