File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ let options = {};
77const signature = process . env . SIGNATURE || null ;
88const policy = process . env . POLICY || null ;
99const cname = process . env . CNAME || null ;
10- const securityEnabled = process . env . SECURITY_ENABLED || false ;
10+ const securityEnabled = process . env . SECURITY_ENABLED || ( policy && signature ) || false ;
1111
1212console . info ( `FILESTACK-JS VERSION::::::: ${ filestack . version } ` )
1313
14- if ( ! signature || ! policy ) {
15- throw new Error ( 'Signature and Policy are always required' )
16- }
17-
1814if ( securityEnabled ) {
15+ if ( ! signature || ! policy ) {
16+ throw new Error ( 'Signature and Policy are always required' )
17+ }
18+
1919 options . security = {
2020 signature,
2121 policy
Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ export const DefinitionsSchema = {
6262 regionsDef : {
6363 id : '/regionsDef' ,
6464 type : 'string' ,
65- pattern : '^[a-zA-Z]{2}-[a-zA-z]{1,}-[1-9]$' ,
66- errorMessage : 'AWS Region Param is in invalid format' ,
65+ // for now we decided to remove validation of regions (AWS + Rackspace)
66+ // pattern: '^[a-zA-Z]{2}-[a-zA-z]{1,}-[1-9]$',
67+ // errorMessage: 'AWS Region Param is in invalid format',
6768 } ,
6869 locationsDef : {
6970 id : '/locationsDef' ,
You can’t perform that action at this time.
0 commit comments