glib-web 0.6.13 → 0.6.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e20093312ead5735f1515024fb1d3f3ed9489a5b779b6bebed5389ee5d467387
4
- data.tar.gz: 59d7bf932016ba5d9cbec3b9496a4684dcb1d9152315a04be64e76d3771b9e34
3
+ metadata.gz: 0c56cc5b0cb3eac25758cb566dcf2b69f10470a65df7fa00d25325db8958961d
4
+ data.tar.gz: 5d2d0bdef7274ec75442b5c8f6a2336463c51f73b07a40905ff5916168eaa349
5
5
  SHA512:
6
- metadata.gz: e309034217ac808d8833d2790f247269bb61034d649b23bfdabda48bbb382aeeaa2aa4411a3a6307516df5ed7711ee5c894a12e5a3fc54f392f4690b64312331
7
- data.tar.gz: 9d10545b5a48359871342d59919f058876f980ee970587a3638d8f89f07d6ff04557de3437ca42a8b93afa4c299b6b8463fb4497618be7956cad79b2d52b653a
6
+ metadata.gz: fa471dad31b61bd7f6562627ece6574b56e68260d456c3f0b4a5f5b3e2ed344cccb6b682654ec286b1b4761a5bcdc51524cb96729dd8896fbc92adff0f141149
7
+ data.tar.gz: 281c3ceba5a2a22320ff553420d4c0a962e41123a35ebcf868127af880742c6e04cc6b2314413191d62b3cc9f0b71f08a9fd727ef2421f709f7209ea839f77ac
@@ -35,14 +35,20 @@ module Glib::Analytics
35
35
  action = request.headers['GApp-Analytics-Referer-Action']
36
36
  segment = request.headers['GApp-Analytics-Referer-Segment']
37
37
  placement = request.headers['GApp-Analytics-Referer-Placement']
38
-
39
- if group.nil? && action.nil? && !request.headers['referer'].nil?
40
- host = URI.parse(request.headers['referer']).host
41
- if host == request.host || !/^(.*).#{request.host.sub('www', '')}/.match(host).nil?
42
- referer_url = request.headers['referer'].delete_suffix('/')
38
+ referrer_url = request.headers['referer'] # Notice that the HTTP header uses one "r"
39
+ if group.nil? && action.nil? && !referrer_url.nil?
40
+ current_host = request.host
41
+ referrer_host = URI.parse(referrer_url).host
42
+
43
+ # Replace the subdomain portion with regex so it will only match the non-subdomain part.
44
+ # This will allow cross-subdomain referral, but it will not work if the host is a bare domain,
45
+ # which is something that we should avoid doing anyway.
46
+ regex = '^([^\.]*)\.'
47
+ if current_host == referrer_host || !/#{current_host.sub(/#{regex}/, regex)}/.match(referrer_host).nil?
48
+ referrer_url = referrer_url.delete_suffix('/')
43
49
 
44
50
  begin
45
- route = Rails.application.routes.recognize_path(referer_url)
51
+ route = Rails.application.routes.recognize_path(referrer_url)
46
52
  group = route[:controller]
47
53
  action = route[:action]
48
54
  rescue ActionController::RoutingError
@@ -225,6 +225,8 @@ class Glib::JsonUi::ViewBuilder
225
225
  string :directUploadUrl
226
226
  string :fileUrl
227
227
  string :fileTitle
228
+ string :uploadText
229
+ string :uploadIcon
228
230
  hash :placeholderView
229
231
  end
230
232
 
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.13
4
+ version: 0.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''