@@ -107,7 +107,7 @@ test('should add WAF headers to local images being transformed', async (t) => {
107
107
cacheDir : '/tmp/ipx-cache' ,
108
108
bypassDomainCheck : true
109
109
} , ( sourceImageOptions ) => {
110
- t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'X-Nf-Waf-Bypass-Token ' ] === 'some token' )
110
+ t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'x-nf-waf-bypass-token ' ] === 'some token' )
111
111
112
112
return Promise . resolve ( { finalize : ( ) => { } } as SourceImageResult )
113
113
} )
@@ -116,7 +116,7 @@ test('should add WAF headers to local images being transformed', async (t) => {
116
116
{
117
117
rawUrl : 'http://localhost:3000/some-path' ,
118
118
path : '/_ipx/w_500/no-file.jpg' ,
119
- headers : { 'X-Nf-Waf-Bypass-Token ' : 'some token' } ,
119
+ headers : { 'x-nf-waf-bypass-token ' : 'some token' } ,
120
120
rawQuery : '' ,
121
121
httpMethod : 'GET' ,
122
122
queryStringParameters : { } ,
@@ -135,7 +135,7 @@ test('should not add WAF headers to remote images being transformed', async (t)
135
135
cacheDir : '/tmp/ipx-cache' ,
136
136
bypassDomainCheck : true
137
137
} , ( sourceImageOptions ) => {
138
- t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'X-Nf-Waf-Bypass-Token ' ] === undefined )
138
+ t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'x-nf-waf-bypass-token ' ] === undefined )
139
139
140
140
return Promise . resolve ( { finalize : ( ) => { } } as SourceImageResult )
141
141
} )
@@ -144,7 +144,7 @@ test('should not add WAF headers to remote images being transformed', async (t)
144
144
{
145
145
rawUrl : 'http://localhost:3000/some-path' ,
146
146
path : '/_ipx/w_500/https%3A%2F%2Fsome-site.com%2Fno-file.jpg' ,
147
- headers : { 'X-Nf-Waf-Bypass-Token ' : 'some token' } ,
147
+ headers : { 'x-nf-waf-bypass-token ' : 'some token' } ,
148
148
rawQuery : '' ,
149
149
httpMethod : 'GET' ,
150
150
queryStringParameters : { } ,
@@ -162,7 +162,7 @@ test('should not add WAF headers to local images if WAF is disabled', async (t)
162
162
cacheDir : '/tmp/ipx-cache' ,
163
163
bypassDomainCheck : true
164
164
} , ( sourceImageOptions ) => {
165
- t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'X-Nf-Waf-Bypass-Token ' ] === undefined )
165
+ t . assert ( sourceImageOptions . requestHeaders && sourceImageOptions . requestHeaders [ 'x-nf-waf-bypass-token ' ] === undefined )
166
166
167
167
return Promise . resolve ( { finalize : ( ) => { } } as SourceImageResult )
168
168
} )
0 commit comments