mirror of
https://github.com/cyclotruc/gitingest.git
synced 2026-05-03 00:40:12 +00:00
replace fastapi-analytics with posthog
This commit is contained in:
parent
edae3cc04b
commit
e86032e38e
3 changed files with 7 additions and 6 deletions
|
|
@ -3,7 +3,6 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from api_analytics.fastapi import Analytics
|
||||
from dotenv import load_dotenv
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.responses import FileResponse, HTMLResponse
|
||||
|
|
@ -31,10 +30,6 @@ static_dir = Path(__file__).parent.parent / "static"
|
|||
app.mount("/static", StaticFiles(directory=static_dir), name="static")
|
||||
|
||||
|
||||
# Set up API analytics middleware if an API key is provided
|
||||
if app_analytics_key := os.getenv("API_ANALYTICS_KEY"):
|
||||
app.add_middleware(Analytics, api_key=app_analytics_key)
|
||||
|
||||
# Fetch allowed hosts from the environment or use the default values
|
||||
allowed_hosts = os.getenv("ALLOWED_HOSTS")
|
||||
if allowed_hosts:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue