Created
December 5, 2019 01:57
-
-
Save lukas-h/1f0fd8c6111140f6f6814fbea5563a35 to your computer and use it in GitHub Desktop.
my firebase hosting config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hosting": { | |
"public": "_site", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"headers": [{ | |
"source": "**", | |
"headers": [{ | |
"key": "Access-Control-Allow-Origin", | |
"value": "*" | |
}, { | |
"key": "Access-Control-Allow-Credentials", | |
"value": "true" | |
}, { | |
"key": "Access-Control-Allow-Headers", | |
"value": "Access-Control-Allow-Origin, Access-Control-Allow-Credentials" | |
}] | |
}, { | |
"source": "**/*.@(jpg|jpeg|gif|png)", | |
"headers": [{ | |
"key": "Cache-Control", | |
"value": "max-age=7200" | |
}] | |
}], | |
"redirects": [{ | |
"source": "/amp/news/:post*", | |
"destination": "https://example.com/news/:post*", | |
"type": 301 | |
} | |
] | |
} | |
} |
Thanks. It solve cors problems too :)
Thanks you !
2 days i'm stuck and you solve my cors problem !
Edit : Works few hours only... Didn't work anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This may help me solve some cors problems. Thanks