File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ let options = {};
7
7
const signature = process . env . SIGNATURE || null ;
8
8
const policy = process . env . POLICY || null ;
9
9
const cname = process . env . CNAME || null ;
10
- const securityEnabled = process . env . SECURITY_ENABLED || false ;
10
+ const securityEnabled = process . env . SECURITY_ENABLED || ( policy && signature ) || false ;
11
11
12
12
console . info ( `FILESTACK-JS VERSION::::::: ${ filestack . version } ` )
13
13
14
- if ( ! signature || ! policy ) {
15
- throw new Error ( 'Signature and Policy are always required' )
16
- }
17
-
18
14
if ( securityEnabled ) {
15
+ if ( ! signature || ! policy ) {
16
+ throw new Error ( 'Signature and Policy are always required' )
17
+ }
18
+
19
19
options . security = {
20
20
signature,
21
21
policy
Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ export const DefinitionsSchema = {
62
62
regionsDef : {
63
63
id : '/regionsDef' ,
64
64
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',
67
68
} ,
68
69
locationsDef : {
69
70
id : '/locationsDef' ,
You can’t perform that action at this time.
0 commit comments