Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(flags): serve the v4 flags response in local dev (#128380)

Anders80961070fb85
diff --git a/bin/start-rust-service b/bin/start-rust-service
index d891be5e6828..d75f36d78242 100755
--- a/bin/start-rust-service
+++ b/bin/start-rust-service
@@ -239,6 +239,8 @@ case "$RS_SVC" in
export DEBUG=1
export ALLOW_INTERNAL_IPS=${ALLOW_INTERNAL_IPS:-true}
export INTERNAL_REQUEST_TOKEN=${INTERNAL_REQUEST_TOKEN:-dev-internal-token}
+ # Answer /flags?v=4 with the v4 response, as production does
+ export FLAGS_V4_RESPONSE_ENABLED=${FLAGS_V4_RESPONSE_ENABLED:-true}
;;
hypercache-server)
diff --git a/docker-compose.dev-full.yml b/docker-compose.dev-full.yml
index 55ac195457cd..40f4bb3a0ad3 100644
--- a/docker-compose.dev-full.yml
+++ b/docker-compose.dev-full.yml
@@ -199,6 +199,9 @@ services:
depends_on:
- redis7
- db
+ environment:
+ # Answer /flags?v=4 with the v4 response, as production does
+ FLAGS_V4_RESPONSE_ENABLED: 'true'
hypercache-server:
extends:
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index ea6b820bd501..f7dd3742036c 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -790,6 +790,8 @@ services:
# FLAG_DEFINITIONS_DEDICATED_REDIS_ENABLED is set.
REDIS_COMPRESSION_ENABLED: 'true'
INTERNAL_REQUEST_TOKEN: 'dev-internal-token'
+ # Answer /flags?v=4 with the v4 response, as production does
+ FLAGS_V4_RESPONSE_ENABLED: 'true'
usage-ingestion:
extends: