excursion 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/excursion/cors.rb +2 -1
- data/lib/excursion/version.rb +1 -1
- 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: f24b992e399793c3aa86eda6b7600607d9a924e8
|
4
|
+
data.tar.gz: 0353b3d1d9c6800aca845a832e628328c9faa4bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a293070a827e2d8f47679dc52a6fbfa6fe4ae279337ba002ccbf2531e77289d1dbfe0f7b6348bbcf19cb05e8a00b504b7004ad0744198a2f0a6f6798ce4649a5
|
7
|
+
data.tar.gz: 5cdd776c45f85af440e94db4d70d9fae4269019389f99427b9614cd7dbd3bc58f5b6211151e076510e679480de4141d2bd703b8b5d5770141acfcfa279d38db6
|
data/lib/excursion/cors.rb
CHANGED
@@ -18,7 +18,8 @@ module Excursion
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def cors_headers
|
21
|
-
|
21
|
+
origin = request.headers['Origin'] || request.headers['HTTP_ORIGIN']
|
22
|
+
if !origin.nil? && cors_whitelisted?(origin) && !cors_blacklisted?(origin)
|
22
23
|
headers['Access-Control-Allow-Origin'] = request.headers['Origin']
|
23
24
|
headers['Access-Control-Allow-Methods'] = Excursion.configuration.cors_allow_methods.join(',')
|
24
25
|
headers['Access-Control-Allow-Headers'] = Excursion.configuration.cors_allow_headers.join(', ')
|
data/lib/excursion/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excursion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|