File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ import http
12from datetime import datetime , timedelta
23
34import httpx
@@ -85,13 +86,26 @@ async def flags(feature: str = None, x_environment_key: str = Header(None)):
8586
8687@app .post ("/api/v1/identities/" , response_class = ORJSONResponse )
8788async def identity (
88- input_data : IdentityWithTraits ,
89- x_environment_key : str = Header (None ),
89+ input_data : IdentityWithTraits ,
90+ x_environment_key : str = Header (None ),
9091):
9192 data = environment_service .get_identity_response_data (input_data , x_environment_key )
9293 return ORJSONResponse (data )
9394
9495
96+ @app .get ("/api/v1/environment-document/" )
97+ def environment_document ():
98+ return ORJSONResponse (
99+ status_code = http .HTTPStatus .BAD_REQUEST ,
100+ content = {
101+ "message" : "The Edge Proxy does not serve environment documents and cannot be consumed using local "
102+ "evaluation. Make sure your Flagsmith client application is consuming the Edge Proxy using "
103+ "remote evaluation, i.e. using a client-side environment key and with local evaluation "
104+ "disabled. See https://docs.flagsmith.com/clients/"
105+ }
106+ )
107+
108+
95109@app .on_event ("startup" )
96110@repeat_every (
97111 seconds = settings .api_poll_frequency_seconds ,
You can’t perform that action at this time.
0 commit comments