-
Notifications
You must be signed in to change notification settings - Fork 175
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(backend): correctly handle AUTHENTICATION_HEADER_VALUE_RE env variable #2257
Conversation
…iable SILENCEFORM_AUTHOR_POPULATE_FROM_HEADER_* env support was removed, but old code is still present, remove it. Correctly parse AUTHENTICATION_HEADER_VALUE_RE env variable into authentication.header.value_re config option. Fixes #2246
case "SILENCEFORM_AUTHOR_POPULATE_FROM_HEADER_VALUE_RE": | ||
return "silenceForm.author.populate_from_header.value_re" | ||
case "AUTHENTICATION_HEADER_VALUE_RE": | ||
return "authentication.header.value_re" |
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.
Is AUTHENTICATION_HEADER_NAME
needed here as well?
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.
No, this whole section is only needed because all underscores are converted to dots. So AUTHENTICATION_HEADER_VALUE_RE
becomes authentication.header.value.re
while [...].value_re
is needed.
A better naming convention would avoid this whole problem.
Go benchmark diff
|
SILENCEFORM_AUTHOR_POPULATE_FROM_HEADER_* env support was removed, but old code is still present, remove it.
Correctly parse AUTHENTICATION_HEADER_VALUE_RE env variable into authentication.header.value_re config option.
Fixes #2246