go_sso 0.5.3 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/go_sso/middleware.rb +7 -1
- data/lib/go_sso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4e9d3420f113280670a8b8f206610a1dd1c4d76bb6e0727b39db1cde195910
|
4
|
+
data.tar.gz: accae72a922e8f8eb5f99a476e0212f7c5df3947ad33a2d0c99d091355c4189c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 478c91c9422b99a3b1829dc22894c7670c420069c262fe6752b8dd8b0ece98b142ecc7b842238791082bd4f6a793eb66f59011d49afca826544409138100611a
|
7
|
+
data.tar.gz: 19bc80e5a169c04ee0f962181093f8c08e2ff13bf0fc1ec3a88711d46ffae1d87d67617035b56edcebfcd1a568b5eecb25d07033c483526864cdcf681216b502
|
data/lib/go_sso/middleware.rb
CHANGED
@@ -11,8 +11,14 @@ module GoSso
|
|
11
11
|
|
12
12
|
def call!(env)
|
13
13
|
@env = env
|
14
|
+
forwarded_host = request.env["HTTP_X_FORWARDED_HOST"]
|
15
|
+
|
16
|
+
GoSso::Current.host = if forwarded_host
|
17
|
+
forwarded_host.split(",").first
|
18
|
+
else
|
19
|
+
request.env["HTTP_HOST"]
|
20
|
+
end
|
14
21
|
|
15
|
-
GoSso::Current.host = request.base_url
|
16
22
|
begin
|
17
23
|
return request_call if on_path?("#{GoSso.routes_prefix}/auth")
|
18
24
|
return logout_call if on_path?("#{GoSso.routes_prefix}/logout") && delete_request?
|
data/lib/go_sso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: go_sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yi Feng
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|