disabled analytics and other data collection
This commit is contained in:
parent
b42d75dca8
commit
3bee2790a4
11
main_app.py
11
main_app.py
@ -1,7 +1,7 @@
|
|||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from urllib.parse import parse_qs
|
from urllib.parse import parse_qs
|
||||||
|
|
||||||
from fastapi import FastAPI, Request
|
from fastapi import FastAPI, Request, HTTPException
|
||||||
from starlette.responses import FileResponse
|
from starlette.responses import FileResponse
|
||||||
|
|
||||||
from const import FEATURES_DICT, ENTITLEMENTS, CURRENT_DATE_MINUS_ONE_DAY, FEATURES, \
|
from const import FEATURES_DICT, ENTITLEMENTS, CURRENT_DATE_MINUS_ONE_DAY, FEATURES, \
|
||||||
@ -236,6 +236,15 @@ async def fake_list_user_webhooks(request: Request, _=host_required([Hosts.CLIEN
|
|||||||
return await return_edited_response(upstream_response, data_override, ignore_official_data=True)
|
return await return_edited_response(upstream_response, data_override, ignore_official_data=True)
|
||||||
|
|
||||||
|
|
||||||
|
@app.post("/v1/initialize", tags=[Hosts.FEATURES.value])
|
||||||
|
@app.options("/v1/initialize", tags=[Hosts.FEATURES.value])
|
||||||
|
@app.post("/v1/rgstr", tags=[Hosts.FEATURES.value])
|
||||||
|
@app.options("/v1/rgstr", tags=[Hosts.FEATURES.value])
|
||||||
|
@app.post("/collect/event", tags=[Hosts.ANALYTICS.value])
|
||||||
|
async def fake_initialize(request: Request, _=host_required([Hosts.FEATURES])):
|
||||||
|
raise HTTPException(status_code=200, detail="Features/analytics data collection disabled by proxy")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/favicon.ico")
|
@app.get("/favicon.ico")
|
||||||
async def favicon():
|
async def favicon():
|
||||||
return FileResponse("favicon.ico")
|
return FileResponse("favicon.ico")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user