Reputation: 6272
I am trying to add a Link
header indicating canonical URL in my firebase hosting.
Here are the docs which show how to capture URL segments for the redirect. However, I cannot make it work for the headers.
Here is my code:
"headers": [ {
"source": "**/:url*",
"headers": [{
"key": "Link",
"value": "<https://example.com/:url>; rel=\"canonical\""
}]
}]
This leads to <https://example.com/:url>
being returned in the link header (i.e. captured segment is not replaced).
Does anyone know how to fix this?
Upvotes: 1
Views: 241
Reputation: 599541
As far as I know there is no way to perform parameter replacement in Firebase Hosting headers. The documentation also doesn't seem to hint that this is possible.
It might be worth to file a feature request, although I've never seen it requested before.
Upvotes: 1