Skip to content
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

fix: frontend all endpoints now accept context correctly #558

Merged

Conversation

sighphyre
Copy link
Member

@sighphyre sighphyre commented Oct 9, 2024

Moves the all endpoints for the frontend API to use the same context parsing path as the non all endpoints. Fixes an issue where context properties would not be correctly considered in the feature evaluation

Closes #555

… non all endpoints, fixes a bug where properties would not be read correctly
Copy link

github-actions bot commented Oct 9, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

}
} else {
context
context.clone()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we do have to clone here, there's no risk other than a bit more of memory allocation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clone here is pretty light, in this context it's probably over optimizing to fix given the amount of memory that's consumed in processing an HTTP request

...but it looks dumb and it's easy to fix so yeah, I took it out! Good eyes!

@sighphyre sighphyre merged commit 560917b into main Oct 9, 2024
9 checks passed
@sighphyre sighphyre deleted the fix/frontend-all-endpoints-now-accept-context-correctly branch October 9, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Context properties are not evaluated when using /api/proxy/all
2 participants