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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab8132a7eecf4dbcd15c02be1910a80ff4f99251
4
- data.tar.gz: 09b7d1bb9d3c3df27b13943717da2fc425d1b173
3
+ metadata.gz: f24b992e399793c3aa86eda6b7600607d9a924e8
4
+ data.tar.gz: 0353b3d1d9c6800aca845a832e628328c9faa4bb
5
5
  SHA512:
6
- metadata.gz: 96cbfb48309e2b4e238b9ec4fb07c9e8ce6832f29001b6b2869ef1ee2d75466b20867245510d44c8b3598e35ae797c0c078cd892f80a65294f5b43d2ae599054
7
- data.tar.gz: 56e54a5963c2ef247b8ba511613c98bb1967ca33acf05689bbbba088a2757497ac37d0c1831db47569a3c73345a1ef7245b11628778412aa67de1ad2cc5d967d
6
+ metadata.gz: a293070a827e2d8f47679dc52a6fbfa6fe4ae279337ba002ccbf2531e77289d1dbfe0f7b6348bbcf19cb05e8a00b504b7004ad0744198a2f0a6f6798ce4649a5
7
+ data.tar.gz: 5cdd776c45f85af440e94db4d70d9fae4269019389f99427b9614cd7dbd3bc58f5b6211151e076510e679480de4141d2bd703b8b5d5770141acfcfa279d38db6
@@ -18,7 +18,8 @@ module Excursion
18
18
  end
19
19
 
20
20
  def cors_headers
21
- if !request.headers['Origin'].nil? && cors_whitelisted?(request.headers['Origin']) && !cors_blacklisted?(request.headers['Origin'])
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(', ')
@@ -1,3 +1,3 @@
1
1
  module Excursion
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
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.3
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-14 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails