projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '19240-check-redirect'
[arvados.git]
/
services
/
api
/
app
/
models
/
api_client.rb
diff --git
a/services/api/app/models/api_client.rb
b/services/api/app/models/api_client.rb
index 6ff29c83e43771bf0d96145505c4efcb246b3382..55a4c6706c7ccb802f50bdd8a2c2fbe3cee4fdee 100644
(file)
--- a/
services/api/app/models/api_client.rb
+++ b/
services/api/app/models/api_client.rb
@@
-15,7
+15,7
@@
class ApiClient < ArvadosModel
end
def is_trusted
end
def is_trusted
- (from_trusted_url && Rails.configuration.Login.
TrustLogin
Tokens) || super
+ (from_trusted_url && Rails.configuration.Login.
IssueTrusted
Tokens) || super
end
protected
end
protected
@@
-43,11
+43,10
@@
class ApiClient < ArvadosModel
def norm url
# normalize URL for comparison
url = URI(url.to_s)
def norm url
# normalize URL for comparison
url = URI(url.to_s)
- if url.scheme == "https"
- url.port == "443"
- end
- if url.scheme == "http"
- url.port == "80"
+ if url.scheme == "https" && url.port == ""
+ url.port = "443"
+ elsif url.scheme == "http" && url.port == ""
+ url.port = "80"
end
url.path = "/"
url
end
url.path = "/"
url