[Sprint/NuancedNumbat](feat): Enable feature flags when staging cookie set. #857
Summary
This allows for an override of the feature service by the setting of a cookie, containing a base64 encoded JSON object (see below for examples).
To test
-
Add a new cookie to your session on the sandbox,
staging-cookie. -
Set the value to a base64 encoded JSON object (I used https://www.base64encode.net/) containing a feature flag that you can test. At the time of writing
cdn-jwtandcassandra-notificationsare the only feature flags I see in there.
Example objects:
-
{"cdn-jwt":true}=>eyJjZG4tand0Ijp0cnVlfQ== -
{"cdn-jwt":false}=>eyJjZG4tand0IjpmYWxzZX0= -
{"cassandra-notifications":true}=>eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6dHJ1ZX0= -
{"cassandra-notifications":false}=>eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6ZmFsc2V9
- Refresh and test whether the cookie worked.
note make sure to check the flag is still used! suggest a search of the codebase for ->has( if you're not sure.
Edited by Ben