File tree 2 files changed +11
-1
lines changed
examples/v7-edge-functions
functions/general/signed-request
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ import HmacSHA1 from 'crypto-js/hmac-sha1';
3
3
import Base64 from 'crypto-js/enc-base64' ;
4
4
import createFetchForOrigin from '../../../utils/createFetchForOrigin' ;
5
5
6
- const fetch = createFetchForOrigin ( 'echo' ) ;
6
+ const fetch = createFetchForOrigin ( 'echo' , {
7
+ edgio : {
8
+ caching : {
9
+ bypass_cache : true ,
10
+ } ,
11
+ } ,
12
+ } ) ;
7
13
8
14
export async function handleHttpRequest ( request , context ) {
9
15
// ** IMPORTANT **
Original file line number Diff line number Diff line change @@ -13,9 +13,13 @@ export default function createFetchWithOrigin(originName: string) {
13
13
}
14
14
15
15
return async ( url : string | Request , options : any = { } ) => {
16
+ const edgio = options . edgio || { } ;
17
+ delete options . edgio ;
18
+
16
19
const modifiedOptions = {
17
20
...options ,
18
21
edgio : {
22
+ ...edgio ,
19
23
origin : originName ,
20
24
} ,
21
25
} ;
You can’t perform that action at this time.
0 commit comments