added google search console
This commit is contained in:
1
googledf500b0e0ed297ad.html
Normal file
1
googledf500b0e0ed297ad.html
Normal file
@@ -0,0 +1 @@
|
||||
google-site-verification: googledf500b0e0ed297ad.html
|
||||
@@ -200,6 +200,15 @@ async def service_worker():
|
||||
response.headers["Cache-Control"] = "no-cache"
|
||||
return response
|
||||
|
||||
|
||||
@app.api_route("/googledf500b0e0ed297ad.html", methods=["GET", "HEAD"], include_in_schema=False)
|
||||
async def google_site_verification():
|
||||
"""Serve Google Search Console ownership verification file."""
|
||||
verification_file = Path(__file__).resolve().parents[2] / "googledf500b0e0ed297ad.html"
|
||||
response = FileResponse(verification_file, media_type="text/html")
|
||||
response.headers["Cache-Control"] = "public, max-age=300"
|
||||
return response
|
||||
|
||||
# Include admin router (always available)
|
||||
app.include_router(admin_router)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user