Skip to content

Commit

Permalink
feat: add robots.txt route
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Jun 15, 2023
1 parent 365354f commit b54e836
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def create_app() -> FastAPI:
if VERSION != "DEV_VERSION":
app.mount("/assets", StaticFiles(directory="dist/assets"), name="assets")
# app.mount("/pwa", StaticFiles(directory="dist/pwa"), name="pwa")
# app.mount("/icons", StaticFiles(directory="dist/icons"), name="icons")
templates = Jinja2Templates(directory="dist")

# Resource
Expand All @@ -57,6 +58,10 @@ def logo():
@app.get("/favicon-light.svg", tags=["html"])
def favicon_light():
return FileResponse("dist/favicon-light.svg")

@app.get("/robots.txt", tags=["html"])
def robots():
return FileResponse("dist/robots.txt")

# HTML Response
@app.get("/{full_path:path}", response_class=HTMLResponse, tags=["html"])
Expand Down

0 comments on commit b54e836

Please sign in to comment.