Skip to content

Commit b292039

Browse files
authored
Merge pull request #80 from fingerprintjs/deploy-rules-linter
chore: linter fix on deploy-rules ci
2 parents b752e05 + 0d3a221 commit b292039

1 file changed

Lines changed: 33 additions & 39 deletions

File tree

scripts/deployRules.ts

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,45 +33,39 @@ const createNewVersion = async (propertyId: string) => {
3333
}
3434

3535
const patchDefaultRuleOrigin = async (propertyId: string, version: string) =>
36-
akamaiRequest({
37-
path: `/papi/v1/properties/${propertyId}/versions/${version}/rules?contractId=${process.env.AK_CONTRACT_ID}&groupId=${process.env.AK_GROUP_ID}`,
38-
method: 'PATCH',
39-
headers: {
40-
'Content-Type': 'application/json-patch+json',
41-
},
42-
body: JSON.stringify([
43-
{
44-
op: 'add',
45-
path: '/rules/behaviors/0/options/customValidCnValues',
46-
value: [
47-
"{{Forward Host Header}}",
48-
"{{Origin Hostname}}"
49-
]
50-
},
51-
{
52-
op: 'replace',
53-
path: '/rules/behaviors/0/options/verificationMode',
54-
value: "CUSTOM"
55-
},
56-
{
57-
op: 'add',
58-
path: '/rules/behaviors/0/options/originCertsToHonor',
59-
value: "STANDARD_CERTIFICATE_AUTHORITIES"
60-
},
61-
{
62-
op: 'add',
63-
path: '/rules/behaviors/0/options/standardCertificateAuthorities',
64-
value: [
65-
"THIRD_PARTY_AMAZON",
66-
"akamai-permissive"
67-
]
68-
},
69-
{
70-
op: 'remove',
71-
path: '/rules/behaviors/1',
72-
}
73-
])
74-
})
36+
akamaiRequest({
37+
path: `/papi/v1/properties/${propertyId}/versions/${version}/rules?contractId=${process.env.AK_CONTRACT_ID}&groupId=${process.env.AK_GROUP_ID}`,
38+
method: 'PATCH',
39+
headers: {
40+
'Content-Type': 'application/json-patch+json',
41+
},
42+
body: JSON.stringify([
43+
{
44+
op: 'add',
45+
path: '/rules/behaviors/0/options/customValidCnValues',
46+
value: ['{{Forward Host Header}}', '{{Origin Hostname}}'],
47+
},
48+
{
49+
op: 'replace',
50+
path: '/rules/behaviors/0/options/verificationMode',
51+
value: 'CUSTOM',
52+
},
53+
{
54+
op: 'add',
55+
path: '/rules/behaviors/0/options/originCertsToHonor',
56+
value: 'STANDARD_CERTIFICATE_AUTHORITIES',
57+
},
58+
{
59+
op: 'add',
60+
path: '/rules/behaviors/0/options/standardCertificateAuthorities',
61+
value: ['THIRD_PARTY_AMAZON', 'akamai-permissive'],
62+
},
63+
{
64+
op: 'remove',
65+
path: '/rules/behaviors/1',
66+
},
67+
]),
68+
})
7569

7670
const patchOriginHostname = async (propertyId: string, version: string) =>
7771
akamaiRequest({

0 commit comments

Comments
 (0)