The Wayback Machine - https://web.archive.org/web/20200912111112/https://github.com/github/secure_headers/pull/436
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

Raise on override defined config #436

Merged
merged 5 commits into from Mar 26, 2020

Conversation

@jobertabma
Copy link
Contributor

jobertabma commented Mar 26, 2020

All PRs:

  • Has tests
  • Documentation updated

This PR changes the behavior of the override and named_append methods to raise an exception when it is called more than once with the same configuration name. This is to avoid unexpected behavior in case a configuration is used in some way in between two configuration declarations.

Fixes #435

@oreoshake
Copy link
Member

oreoshake commented Mar 26, 2020

Open question: should the named_append method also check the existence of a configuration in the @overrides hash and vice versa?

🤔 it'd probably be confusing and I can't think of a reason why you'd want overrides and appends to have the same name, or at least I think you'd be OK with making the required change once your app stopped booting?

@jobertabma
Copy link
Contributor Author

jobertabma commented Mar 26, 2020

@oreoshake I've updated the PR based on your comment, should be ready for review. Thanks!

Copy link
Member

oreoshake left a comment

LGTM thanks!

@oreoshake oreoshake merged commit 38a59ce into github:master Mar 26, 2020
3 checks passed
3 checks passed
Build + Test (2.4)
Details
Build + Test (2.5)
Details
Build + Test (2.6)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.