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

Pass reference to controller to CSP callable config values #148

Merged
merged 2 commits into from
Jun 18, 2015

Conversation

oreoshake
Copy link
Contributor

Without this, the code executes in the context of SecureHeaders::Configuration:Module which is pretty useless.

e.g.

   :enforce => lambda { |controller| controller.current_user.beta_testing? }

This is kind of a breaking change, if lambdas were using instead of procs since the lambda enforces the passed in value.

e.g.

```
   :enforce => lambda { |controller| controller.current_user.beta_testing? }

```
oreoshake added a commit that referenced this pull request Jun 18, 2015
Pass reference to controller to CSP callable config values
@oreoshake oreoshake merged commit ccaa65c into master Jun 18, 2015
@oreoshake oreoshake deleted the pass-reference-to-controller branch June 18, 2015 21:56
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.

1 participant