glib-web 0.6.7 → 0.6.8

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: a570033b2f2290d45f8678518c0f5cdfcbd5edc3ad58f640e0927c44ebd4e52e
4
- data.tar.gz: 48c8031d6b01a819dbc7f2496a4e95861f45df9f29386bf7b96b19adb8dc1c2c
3
+ metadata.gz: debfa281cad1c3955db718e9bc04f0190e3c3d7af424de2179d83be7e95f6dc0
4
+ data.tar.gz: 93dc0caef3ad5f2f084c8455bcf04dd26ce29f7bc6b15931be720016c5c93483
5
5
  SHA512:
6
- metadata.gz: 8dee6863475ddb393169c8a22cdc09945c656c879e9780782bcd04efdf6a193bdc2153e9371a3fb3c24b67d4fd2bcb479d5fba31d171092b726e31e3dd82e784
7
- data.tar.gz: b77f966accd930a4a932d17af6e4d35cec5507b31ac1ec7a7f7153ef075b355d8dea36f512d2fe40c913832c0c241e24e67a91ba65ea0eff2d851408f90be302
6
+ metadata.gz: 111b791d73b6f8a57b69441d173f62a8bd2fb77b278ed861457a5e9f1e384f93b7fac3e651cdf26c031612710730cc8f9e8dcc6090daba6f247c155f3a4600e3
7
+ data.tar.gz: b46e226e8736f9cf33ef07fe2d548c1c136781d9216f1041964d574fe7dffc47d69f001b11606391555d3588dfd596c68b191a499708e1f3b196aa00982ac9a9
@@ -1,3 +1,4 @@
1
+ require 'uri'
1
2
  module Glib::Analytics
2
3
  module Funnel
3
4
  extend ActiveSupport::Concern
@@ -36,10 +37,8 @@ module Glib::Analytics
36
37
  placement = request.headers['GApp-Analytics-Referer-Placement']
37
38
 
38
39
  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}")
40
+ host = URI.parse(request.headers['referer']).host
41
+ if host == request.host || !/^(.*).#{request.host.sub('www','')}/.match(host).nil?
43
42
 
44
43
  route = Rails.application.routes.recognize_path(request.headers['referer'].delete_suffix('/'))
45
44
  group = route[:controller]
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.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''