-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow feature flags to use sessionStorage
and ignore ff_
query params
#2121
Conversation
Size Change: +794 B (0%) Total Size: 834 kB
ℹ️ View Unchanged
|
Full-stack documentation: https://docs.openverse.org/_preview/2121 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working great with all the flags that have a storage
key set in feature-flags.json
. With fake_sensitive
, there's some really weird behavior where it seems the key is being saved to session storage and cookie storage!
@zackkrida I believe you've misread and gotten I'm happy to update the names to be more distinct if you have any ideas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the time-wasting fake/fetch nonsense 😭 this is working perfectly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through all the testing steps and it performed as expected! And the code generally makes sense to me too 😄
Description
This PR is a PoC for #2118 that demonstrates feature flags that can be backed by session-storage. It also allows feature flags to ignore
ff_
query params when reading from them can open the possibility for malicious activity.Testing Instructions
Session storage
/preferences
.fetch_sensitive
flag to on./preferences
./preferences
.No
ff_
query/preferences
. Ensuresensitive_content
andfetch_sensitive
are both off./preferences?ff_sensitive_content=on
. See that the switch is flipped on./preferences?ff_fetch_sensitive=on
. See that the switch is still off.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin