glib-web 0.6.5 → 0.6.6

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
  SHA256:
3
- metadata.gz: 3d894626cc2535cdc34df54fdd1dffecc54d2eeb990f943aedaa8b9b3a1ef74f
4
- data.tar.gz: 6ee401be38c2a676ade288d4dbd76cc8779ed4b51ea596ffaca108907b05561c
3
+ metadata.gz: 5f6803ad260efc33294f643a2a623e418a260b24b18729142aeb41f6a6d891c9
4
+ data.tar.gz: e3c581588cff960a60857cd63aa904dae41a81da4a86596b2bf17275353acca9
5
5
  SHA512:
6
- metadata.gz: dad59bde7f303a50f537488130f0c421cd8dc19113590e190c55a7326b5df0b0c13ae2efafce2245c3d17bb542fbf9591723ef61794599d9134c6ba1fe783493
7
- data.tar.gz: 062fde34dc5b4793f2751b94bf4ed8303e6719c0270027011afa966f4a948a599d3161b39152ce6647b84ca7b86a1ea1ac0f96817eab749c351f184d975d27c6
6
+ metadata.gz: 1de3a468c5f82b9d4ee70afc5763e1ab9f31e4ff54cbb14ed891ff546b867db084a6c5d091cc4cb70d6f75fc24b0fe052c169beb6edc4e3c3e96beefe3208574
7
+ data.tar.gz: c7cd87a3e9399c9b03730eee4a16f679af1d55eada9b0a4468129a122306a5ef54d42e4c3a9ef39617a320d38cadc00e08ca60255443abaeae6b7944034172ce
@@ -35,9 +35,16 @@ module Glib::Analytics
35
35
  segment = request.headers['GApp-Analytics-Referer-Segment']
36
36
  placement = request.headers['GApp-Analytics-Referer-Placement']
37
37
 
38
- if (route = Rails.application.routes.recognize_path(request.headers['referer'])) && group.nil? && action.nil?
39
- group = route[:controller]
40
- action = route[:action]
38
+ if group.nil? && action.nil? && !request.headers['referer'].nil?
39
+ if request.headers['referer'].start_with?("http://#{request.host}",
40
+ "https://#{request.host}",
41
+ "http://www.#{request.host}",
42
+ "https://www.#{request.host}")
43
+
44
+ route = Rails.application.routes.recognize_path(request.headers['referer'].delete_suffix('/'))
45
+ group = route[:controller]
46
+ action = route[:action]
47
+ end
41
48
  end
42
49
 
43
50
  if group && action
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''