Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

Rationale

We don't want to reset all HTTP headers when returning a 401 or other error page

Changes

  • Retain HTTP headers like CSP and Strict-Transport-Security
  • Minor code cleanup and Java 25 syntax


response.reset();

securityHeaders.forEach(response::setHeader);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this test response.isCommitted()? Will it throw if setHeader() is called late?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is all inside of if (!response.isCommitted()). See line 823, just outside the lines shown in the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants