Skip to content

Commit

Permalink
feat(headers): disable analytics by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jssevestre committed Oct 3, 2022
1 parent 15405ed commit 1b83955
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lumapps/api/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(
self._token = None
self._endpoints = None
self._client = None
self._headers: dict = {}
self._headers: dict = {"x-lumapps-analytics": "off"}
if extra_http_headers:
self._headers.update(extra_http_headers)
if api_info is None:
Expand Down
6 changes: 5 additions & 1 deletion lumapps/latest/client/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def request(self, request: Request, **_: Any) -> Response:
request.method,
f"{self.organization_url}/{request.url.lstrip('/')}",
params=request.params,
headers={**request.headers, "User-Agent": "lumapps-sdk"},
headers={
**request.headers,
"User-Agent": "lumapps-sdk",
"x-lumapps-analytics": "off",
},
json=request.json,
)
return Response(
Expand Down

0 comments on commit 1b83955

Please sign in to comment.