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 11{
22 "hosting" : {
33 "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+ ],
911 "rewrites" : [
1012 {
1113 "source" : " /**" ,
1214 "function" : " sendStoredFile"
1315 }
1416 ]
17+ },
18+ "storage" : {
19+ "rules" : " storage.rules"
1520 }
1621}
Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ function sendStoredFile(request, response) {
5555 return bucket . file ( downloadPath ) . download ( {
5656 destination : `/tmp/${ fileName } `
5757 } ) . 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 } ` ) ;
6263 } ) ;
6364 }
6465}
You can’t perform that action at this time.
0 commit comments