FIX: firebase cache
Better caching policies
This commit is contained in:
parent
418a5a2d71
commit
386211b24b
2 changed files with 22 additions and 1 deletions
|
@ -1,5 +1,24 @@
|
||||||
{
|
{
|
||||||
"hosting": {
|
"hosting": {
|
||||||
|
"headers": [{
|
||||||
|
"source" : "**/*.@(eot|otf|ttf|ttc|woff|font.css)",
|
||||||
|
"headers" : [ {
|
||||||
|
"key" : "Access-Control-Allow-Origin",
|
||||||
|
"value" : "*"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"source" : "**/*.@(js|css)",
|
||||||
|
"headers" : [ {
|
||||||
|
"key" : "Cache-Control",
|
||||||
|
"value" : "max-age=604800"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"source" : "**/*.@(jpg|jpeg|gif|png|svg)",
|
||||||
|
"headers" : [ {
|
||||||
|
"key" : "Cache-Control",
|
||||||
|
"value" : "max-age=604800"
|
||||||
|
} ]
|
||||||
|
}],
|
||||||
"public": ".output/public",
|
"public": ".output/public",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"firebase.json",
|
"firebase.json",
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
export const getImage = (path : string, img : string) => (size : '1x' | '2x' | '3x', set : boolean) => `${path}${img}@${size}.webp${set ? ` ${size}` : ''}`
|
export const getImage =
|
||||||
|
(path: string, img: string) => (size: "1x" | "2x" | "3x", set: boolean) =>
|
||||||
|
`${path}${img}@${size}.webp${set ? ` ${size}` : ""}`;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue