Skip to content

feat(browser_reporting): Only set headers if option is available #93641

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

Merged
merged 5 commits into from
Jun 18, 2025

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Jun 16, 2025

Based on @lobsterkatie 's work (#93560).

Only set the Reporting-Endpoints header if the option issues.browser_reporting.reporting_endpoints_header_enabled is set (since checking for staff.is_active is not working as expected.

Handle when the DB is not accessible by the request.

lobsterkatie and others added 3 commits June 16, 2025 14:44
…eader (#93560)

This switches our check for whether to add the `Reporting-Endpoints`
header from using `staff.is_active` (which seems to be false even if the
user has `is_staff = True` in the database) to using a new option,
`issues.browser_reporting.reporting_endpoints_header_enabled`.
@armenzg armenzg requested a review from lobsterkatie June 16, 2025 18:58
@armenzg armenzg self-assigned this Jun 16, 2025
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 16, 2025
@armenzg armenzg marked this pull request as ready for review June 16, 2025 19:00
@armenzg armenzg requested a review from a team as a code owner June 16, 2025 19:00
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #93641      +/-   ##
==========================================
+ Coverage   81.66%   88.04%   +6.37%     
==========================================
  Files       10330    10330              
  Lines      596288   596093     -195     
  Branches    23163    23111      -52     
==========================================
+ Hits       486957   524807   +37850     
+ Misses     108875    70793   -38082     
- Partials      456      493      +37     

@armenzg armenzg merged commit ce36da3 into master Jun 18, 2025
64 checks passed
@armenzg armenzg deleted the feat/set_headers/armenzg branch June 18, 2025 00:29
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
)

Based on @lobsterkatie 's work (#93560).

Only set the `Reporting-Endpoints` header if the option
`issues.browser_reporting.reporting_endpoints_header_enabled` is set
(since checking for `staff.is_active` is not working as expected.

Handle when the DB is not accessible by the request.

---------

Co-authored-by: Katie Byers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants