File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
scripts/code.angularjs.org-firebase Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"hosting" : {
3
3
"public" : " public" ,
4
- "redirects" : [ {
5
- "source" : " /:version/docs" ,
6
- "destination" : " /:version/docs/index.html" ,
7
- "type" : 301
8
- }],
4
+ "redirects" : [
5
+ {
6
+ "source" : " /:version/docs" ,
7
+ "destination" : " /:version/docs/index.html" ,
8
+ "type" : 301
9
+ }
10
+ ],
9
11
"rewrites" : [
10
12
{
11
13
"source" : " /**" ,
12
14
"function" : " sendStoredFile"
13
15
}
14
16
]
17
+ },
18
+ "storage" : {
19
+ "rules" : " storage.rules"
15
20
}
16
21
}
Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ function sendStoredFile(request, response) {
55
55
return bucket . file ( downloadPath ) . download ( {
56
56
destination : `/tmp/${ fileName } `
57
57
} ) . then ( ( ) => {
58
- return response . status ( 200 ) . set ( {
59
- 'Content-Encoding' : 'gzip' ,
60
- 'Cache-Control' : 'public, max-age=300, s-maxage=600'
61
- } ) . sendFile ( `${ LOCAL_TMP_FOLDER } ${ fileName } ` ) ;
58
+ return response . status ( 200 )
59
+ . set ( {
60
+ 'Cache-Control' : 'public, max-age=300, s-maxage=600'
61
+ } )
62
+ . sendFile ( `${ LOCAL_TMP_FOLDER } ${ fileName } ` ) ;
62
63
} ) ;
63
64
}
64
65
}
You can’t perform that action at this time.
0 commit comments