@@ -33,45 +33,39 @@ const createNewVersion = async (propertyId: string) => {
3333}
3434
3535const 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
7670const patchOriginHostname = async ( propertyId : string , version : string ) =>
7771 akamaiRequest ( {
0 commit comments