charcoal 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/charcoal/cross_origin.rb +6 -1
- data/lib/charcoal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ec072814ddf66d61a1582598925100c1052110b9e6f9cff77f4b794fd963372
|
|
4
|
+
data.tar.gz: 66207458d0d04329800b782042cf1e7c0b3688788d91dd77195bcc3e35fca8f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2770094d8cab446496c351f495b16dfeb52fd03b83c79cf32c92b7469b48d8f7765bdf9b8933caceb6b8f9ee036211f16c6e831fe11f4aecdd448be0b44eec0
|
|
7
|
+
data.tar.gz: 378744648d1af075910e5b3c357ec4a690fb86be9cd86cea7fc20bcbce34a3c6e5d12bf2b778270ae1ed8554013f98db882b58530d77cf6a2faeaeb351ac6544
|
|
@@ -42,7 +42,7 @@ module Charcoal
|
|
|
42
42
|
|
|
43
43
|
def set_cors_headers
|
|
44
44
|
headers["Access-Control-Allow-Origin"] = allowed_origin
|
|
45
|
-
headers["Access-Control-Allow-Credentials"] =
|
|
45
|
+
headers["Access-Control-Allow-Credentials"] = "true" if credentials_allowed?
|
|
46
46
|
headers["Access-Control-Expose-Headers"] = Charcoal.configuration["expose-headers"].join(",")
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -50,5 +50,10 @@ module Charcoal
|
|
|
50
50
|
value = Charcoal.configuration["allow-origin"]
|
|
51
51
|
value.respond_to?(:call) ? value.call(self) : value.to_s
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
def credentials_allowed?
|
|
55
|
+
value = Charcoal.configuration["credentials"]
|
|
56
|
+
value.respond_to?(:call) ? value.call(self) : value
|
|
57
|
+
end
|
|
53
58
|
end
|
|
54
59
|
end
|
data/lib/charcoal/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: charcoal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steven Davidovitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01-
|
|
11
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|