-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from akamai/release/2.1.0
Release/2.1.0 => Master
- Loading branch information
Showing
13 changed files
with
213 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
registry=https://registry.npmjs.org/ | ||
fetch-retry-mintimeout=1000 | ||
fetch-retry-maxtimeout=5000 | ||
strict-ssl=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
let AdvancedSettings = require('../../src/advancedsettings').advancedsettings; | ||
let out = require('./lib/out'); | ||
|
||
class PragmaHeaderCommand { | ||
constructor() { | ||
this.flags = 'pragma-header'; | ||
this.desc = '(Beta) Display Pragma Header settings'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--policy <id>', { | ||
desc: | ||
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.', | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
out.print({ | ||
promise: new AdvancedSettings(options).getPragmaHeader(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new PragmaHeaderCommand (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
let AdvancedSettings = require('../../src/advancedsettings').advancedsettings; | ||
let out = require('./lib/out'); | ||
|
||
class PragmaHeaderModifyCommand { | ||
constructor() { | ||
this.flags = 'modify-pragma-header'; | ||
this.desc = '(Beta) Update Pragma Header settings.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.positional('<@path>', { | ||
paramsDesc: 'The input file path.' | ||
}) | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.check((argv, context) => { | ||
if (!argv['@path'].startsWith('@')) { | ||
return context.cliMessage("ERROR: Invalid file name, should start with '@'"); | ||
} | ||
}); | ||
} | ||
run(options) { | ||
options.file = options['@path'].replace('@', ''); | ||
out.print({ | ||
promise: new AdvancedSettings(options).updatePragmaHeader(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new PragmaHeaderModifyCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"action": "REMOVE", | ||
"excludeCondition": [ | ||
{ | ||
"type":"requestHeaderValueMatch", | ||
"positiveMatch": true, | ||
"header": "accept", | ||
"value": [ "application/json", "application/xml"], | ||
"valueCase": false, | ||
"valueWildcard": true | ||
}, | ||
{ | ||
"type":"ipMatch", | ||
"positiveMatch": true, | ||
"value": [ "1.1.1.1", "192.168.100.14/24"], | ||
"useHeaders": false | ||
} | ||
] | ||
} |