File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
functions/dns-redirecting Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ nodejs_binary(
3030 "--project" ,
3131 "internal-200822" ,
3232 "--config" ,
33- # TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
34- "$$(rlocation dev-infra/apps/firebase.json)" ,
33+ "firebase.json" ,
3534 "emulators:start" ,
3635 ],
3736)
@@ -55,8 +54,7 @@ nodejs_binary(
5554 "--project" ,
5655 "internal-200822" ,
5756 "--config" ,
58- # TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
59- "$$(rlocation dev-infra/apps/firebase.json)" ,
57+ "firebase.json" ,
6058 "deploy" ,
6159 ],
6260)
Original file line number Diff line number Diff line change @@ -46,6 +46,15 @@ export const dnsRedirecting = functions.https.onRequest(
4646 if ( hostname === 'blog.angular.io' ) {
4747 response . redirect ( redirectType , `https://blog.angular.dev${ request . originalUrl } ` ) ;
4848 }
49+ if ( hostname === 'material.angular.io' ) {
50+ response . redirect ( redirectType , `https://material.angular.dev${ request . originalUrl } ` ) ;
51+ }
52+ if ( hostname . endsWith ( '.material.angular.io' ) ) {
53+ response . redirect (
54+ redirectType ,
55+ `https://${ request . subdomains [ 0 ] } .material.angular.dev${ request . originalUrl } ` ,
56+ ) ;
57+ }
4958
5059 // If no redirect is matched, we return a failure message
5160 response . status ( 404 ) ;
You can’t perform that action at this time.
0 commit comments