Skip to content

Commit

Permalink
Configure "preview" target like "dartpad" target (#3187)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpryan authored Mar 6, 2025
1 parent 9d32510 commit 2d3a8e2
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions pkgs/dartpad_ui/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,90 @@
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"redirects": [
{
"source": "/dart",
"destination": "/?sample=dart",
"type": 301
},
{
"source": "/flutter",
"destination": "/?sample=flutter",
"type": 301
},
{
"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
},
{
"source": "/workshops?(.html)",
"destination": "https://github.com/dart-lang/dart-pad/wiki/Workshop-authoring-guide",
"type": 301
}
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/frame/assets/**",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
},
{
"source": "**",
"headers": [
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "credentialless"
},
{
"key": "Cross-Origin-Resource-Policy",
"value": "cross-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
}
]
}
]
}
]
Expand Down

0 comments on commit 2d3a8e2

Please sign in to comment.