rack-cors 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack-cors might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/rack/cors.rb +2 -1
- data/lib/rack/cors/version.rb +1 -1
- data/test/unit/cors_test.rb +9 -0
- data/test/unit/test.ru +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 509192f6673d85eb0b23b4169f5d392d1e380fdc
|
4
|
+
data.tar.gz: 5b123af66d8580566d8012012f62f90e8f4043d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 274193cd4cc2bca5187e0fd7aacb928558cc5a0bddcd236c56b7791ccc8e7ceaffd53f96bae15992960d614de3bfd1ed12c0fa459ad25b7c5313ec8d166bbe1b
|
7
|
+
data.tar.gz: ba69d913329a58954760c7acd2d0d574ca5620e90b98617c65cfc67136433b9b834c6364a018d01dd231632a44a2c5ee4a398bd5fe1d4c27af44ed50e8c0cfbd
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## 1.0.1 - 2017-07-18
|
5
|
+
### Fixed
|
6
|
+
- Allow lambda origin configuration
|
7
|
+
|
4
8
|
## 1.0.0 - 2017-07-15
|
5
9
|
### Security
|
6
10
|
- Don't implicitly accept 'null' origins when 'file://' is specified
|
data/lib/rack/cors.rb
CHANGED
data/lib/rack/cors/version.rb
CHANGED
data/test/unit/cors_test.rb
CHANGED
@@ -90,6 +90,15 @@ describe Rack::Cors do
|
|
90
90
|
successful_cors_request '/proc-origin', :origin => 'http://10.10.10.10:3000'
|
91
91
|
end
|
92
92
|
|
93
|
+
it 'should support lambda origin configuration' do
|
94
|
+
successful_cors_request '/lambda-origin', :origin => 'http://10.10.10.10:3000'
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'should support proc origins configuration (inverse)' do
|
98
|
+
cors_request '/proc-origin', :origin => 'http://bad.guy'
|
99
|
+
last_response.wont_render_cors_success
|
100
|
+
end
|
101
|
+
|
93
102
|
it 'should not mix up path rules across origins' do
|
94
103
|
header 'Origin', 'http://10.10.10.10:3000'
|
95
104
|
get '/' # / is configured in a separate rule block
|
data/test/unit/test.ru
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Calvin Yu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|