Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/edge_proxy/server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import http
from datetime import datetime, timedelta

import httpx
Expand Down Expand Up @@ -92,6 +93,19 @@ async def identity(
return ORJSONResponse(data)


@app.get("/api/v1/environment-document/")
def environment_document():
return ORJSONResponse(
status_code=http.HTTPStatus.BAD_REQUEST,
content={
"message": "The Edge Proxy does not serve environment documents and cannot be consumed using local "
"evaluation. Make sure your Flagsmith client application is consuming the Edge Proxy using "
"remote evaluation, i.e. using a client-side environment key and with local evaluation "
"disabled. See https://docs.flagsmith.com/clients/"
},
)


@app.on_event("startup")
@repeat_every(
seconds=settings.api_poll_frequency_seconds,
Expand Down
Loading