File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,14 @@ app.route('/authors', authors);
16
16
app . route ( '/newsletter' , newsletter ) ;
17
17
app . route ( '/banners' , banners ) ;
18
18
19
+ app . get ( '/robots.txt' , ( c ) => {
20
+ const robotsTxt = `User-agent: *
21
+ Disallow: /` ;
22
+ return c . text ( robotsTxt , 200 , {
23
+ 'Content-Type' : 'text/plain' ,
24
+ } ) ;
25
+ } ) ;
26
+
19
27
app . onError ( ( err , c ) => {
20
28
console . error ( err ) ;
21
29
if ( err instanceof HTTPException ) {
Original file line number Diff line number Diff line change 25
25
"assets" : [
26
26
" apps/blog/src/assets" ,
27
27
" apps/blog/src/sitemap.xml" ,
28
- " apps/blog/src/_redirects"
28
+ " apps/blog/src/_redirects" ,
29
+ " apps/blog/src/robots.txt"
29
30
],
30
31
"styles" : [
31
32
" apps/blog/src/styles.scss" ,
Original file line number Diff line number Diff line change
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Host: staging .angular .love
5
+ User-agent: *
6
+ Disallow: /
7
+
8
+ Host: testing .angular .love
9
+ User-agent: *
10
+ Disallow: /
11
+
12
+ Host: bff .angular .love
13
+ User-agent: *
14
+ Disallow: /
You can’t perform that action at this time.
0 commit comments