grape-cors 0.9.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/grape-cors.rb +9 -6
- 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: 93c2a19d884e75a912f3f9249c16149517aadf00
|
4
|
+
data.tar.gz: 02f8f96fbb922843f3691d80bd8ec68fc99a62c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c63ddf0053af39f3bab61ec4f244047f3512fb8ef18ef4463df4a27cf458a7350fa3dac1d3c2b064d9b0a18dae4a8d74601acd42daa2a1f8a8c07a39cf54632
|
7
|
+
data.tar.gz: 0dfb981ec388a8ce759f9065daa0bc5027f29949158e0126240623e5792a2299e2feaa4dbb9ec7778ba4f7f4d7a6b8b2143835a60ca0ae9f62702c2b38b8ad53
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.2
|
data/lib/grape-cors.rb
CHANGED
@@ -19,17 +19,20 @@ module Grape
|
|
19
19
|
@acah ||= 'Access-Control-Allow-Headers'
|
20
20
|
@acao ||= 'Access-Control-Allow-Origin'
|
21
21
|
@acam ||= 'Access-Control-Allow-Methods'
|
22
|
+
@extra_headers ||= {}
|
22
23
|
class << self
|
23
24
|
|
24
25
|
attr_reader :headers,:origin,:methods,
|
25
|
-
:acah,:acao,:acam
|
26
|
+
:acah,:acao,:acam,:extra_headers
|
26
27
|
|
27
28
|
def object
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
Config.extra_headers.merge(
|
30
|
+
{
|
31
|
+
Config.acah => Config.headers,
|
32
|
+
Config.acao => Config.origin,
|
33
|
+
Config.acam => Config.methods
|
34
|
+
}
|
35
|
+
)
|
33
36
|
end;alias obj object
|
34
37
|
|
35
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-cors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|