Skip to content

Commit

Permalink
Add robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
koldakov committed Sep 6, 2024
1 parent 6fae43b commit 9fe110b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions futuramaapi/routers/root/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ async def cookie_logout_user(
return response


@router.get(
"/robots.txt",
include_in_schema=False,
)
async def robots():
return FileResponse("robots.txt")


@router.get(
"/{shortened}",
include_in_schema=False,
Expand Down
11 changes: 11 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
User-agent: *
Disallow: /api/
Allow: /

User-agent: Googlebot
Disallow: /api/
Allow: /

User-agent: Yandex
Disallow: /api/
Allow: /

0 comments on commit 9fe110b

Please sign in to comment.