better_content_security_policy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 552075b6d7925fc453e0fa3d02fcf36e380b2ed9345fba59a4076d725f99dd7b
|
4
|
+
data.tar.gz: ba505d6e92e8a79cb04fe5af5c6effca9bef42ead63ec79f452b7a06cdd76f28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea5026f84fc2424bbe827162c5cb929859833423ed587bb1cf6ca97ea2eb3d35dd9a70ad62c087805ad4931978a42e50b85a60798acf4986328496702fec714
|
7
|
+
data.tar.gz: '03158b9addc223af6d297793b9def992ef9e3b947ae7d52e6ec4dfad348abd9ec61ebe0e3fbbf7e65aa9661ad1995ce246aa960faeaff0189df17534cf0746dc'
|
data/Gemfile.lock
CHANGED
@@ -88,6 +88,8 @@ GEM
|
|
88
88
|
nio4r (2.5.8)
|
89
89
|
nokogiri (1.12.5-x86_64-darwin)
|
90
90
|
racc (~> 1.4)
|
91
|
+
nokogiri (1.12.5-x86_64-linux)
|
92
|
+
racc (~> 1.4)
|
91
93
|
parallel (1.22.1)
|
92
94
|
parser (3.1.2.1)
|
93
95
|
ast (~> 2.4.1)
|
@@ -172,6 +174,7 @@ GEM
|
|
172
174
|
|
173
175
|
PLATFORMS
|
174
176
|
x86_64-darwin-21
|
177
|
+
x86_64-linux
|
175
178
|
|
176
179
|
DEPENDENCIES
|
177
180
|
better_content_security_policy!
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
![Ruby CI builds](https://github.com/DocSpring/better_content_security_policy/actions/workflows/main.yml/badge.svg)
|
2
|
+
|
1
3
|
# Better Content Security Policy
|
2
4
|
|
3
|
-
This gem
|
4
|
-
|
5
|
+
This gem allows you to configure flexible and dynamic `Content-Security-Policy` headers for your Rails application.
|
6
|
+
By default, Rails only allows you to configure one global Content Security Policy for your whole application, in `config/initializers/content_security_policy.rb`. This gem moves the CSP logic into your controllers and views, so you can create multiple unique policies for different controllers, or add new rules for a specific action.
|
5
7
|
|
6
8
|
Read the MDN Web Docs to learn more about Content Security Policies: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
|
7
9
|
|
@@ -115,7 +117,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
115
117
|
|
116
118
|
## Contributing
|
117
119
|
|
118
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
120
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/DocSpring/better_content_security_policy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/DocSpring/better_content_security_policy/blob/main/CODE_OF_CONDUCT.md).
|
119
121
|
|
120
122
|
## License
|
121
123
|
|
@@ -123,4 +125,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
123
125
|
|
124
126
|
## Code of Conduct
|
125
127
|
|
126
|
-
Everyone interacting in the BetterContentSecurityPolicy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
128
|
+
Everyone interacting in the BetterContentSecurityPolicy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/DocSpring/better_content_security_policy/blob/main/CODE_OF_CONDUCT.md).
|
@@ -10,6 +10,8 @@ module BetterContentSecurityPolicy
|
|
10
10
|
extend ActiveSupport::Concern
|
11
11
|
|
12
12
|
included do
|
13
|
+
private :set_content_security_policy_header, :content_security_policy
|
14
|
+
|
13
15
|
helper_method :content_security_policy
|
14
16
|
before_action :configure_content_security_policy
|
15
17
|
after_action :set_content_security_policy_header
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_content_security_policy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Broadbent
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|