Skip to content

Commit

Permalink
add firebase redirects to handle older paths (#2800)
Browse files Browse the repository at this point in the history
* add firebase redirects to handle older paths

* Use `/` instead of `/index.html` for redirects

* Add additional redirects

* Include embed-html in redirects

---------

Co-authored-by: John Ryan <[email protected]>
  • Loading branch information
devoncarew and johnpryan authored Jan 30, 2024
1 parent beaafd5 commit d645c1c
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions pkgs/sketch_pad/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@
"**/.*",
"**/node_modules/**"
],
"redirects": [
{
"source": "/embed-dart.html",
"destination": "/?embed=true",
"type": 301
},
{
"source": "/embed-flutter.html",
"destination": "/?embed=true",
"type": 301
},
{
"source": "/embed-flutter_showcase.html",
"destination": "/?embed=true",
"type": 301
},
{
"source": "/embed-html.html",
"destination": "/?embed=true",
"type": 301
},
{
"source": "/embed-inline.html",
"destination": "/?embed=true",
"type": 301
}
],
"rewrites": [
{
"source": "**",
Expand Down Expand Up @@ -53,12 +80,24 @@
{
"source": "**",
"headers": [
{ "key": "Cross-Origin-Opener-Policy", "value": "same-origin"},
{ "key": "Cross-Origin-Embedder-Policy", "value": "credentialless"},
{ "key": "X-Content-Type-Options", "value": "nosniff"},
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin"}
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "credentialless"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
}
]
}
]
}
}
}

0 comments on commit d645c1c

Please sign in to comment.