Based on the firebase hosting documentation, I’m trying to update the header configuration (without having to redeploy everything, which is important in my case).
https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.versions/patch
However, I can’t do it, I always get an error.
Here’s the URL
https://firebasehosting.googleapis.com/v1beta1/sites/SITE_NAME/versions/VERSION_ID?updateMask=config
Here’s the body of my request:
{
"config": {
"headers": [
{
"headers": {
"Content-Security-Policy": "frame-src https://...
},
"glob": "**/*"
}
]
}
}
The response:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
Note that when I try to modify the labels (for example), it works.
{
"labels": {
"foo":"bar"
}
}
Does anyone have a solution?
2
Answers
Thanks for your reply,
I had already tried this solution, but unfortunately it didn't work.
Here is the response:
}
can you try
insted of