mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 23:15:47 +00:00
Small refactor
This commit is contained in:
parent
34a9f29465
commit
0a02b7ad63
@ -110,7 +110,7 @@
|
||||
# Serving
|
||||
1050: ["invalid_container_id", "invalid container id"]
|
||||
1051: ["container_not_registered", "container is not registered"]
|
||||
1052: ["no_containers_for_url", "no container instances found for serice url"]
|
||||
1052: ["no_containers_for_url", "no container instances found for service url"]
|
||||
|
||||
1104: ["invalid_scroll_id", "Invalid scroll id"]
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ class RequestHandlers:
|
||||
settings["domain"] = domain
|
||||
return settings
|
||||
|
||||
def _get_identity_from_encoded_token(self, encoded: str):
|
||||
return Token.decode_identity(encoded)
|
||||
|
||||
def before_request(self):
|
||||
if request.method == "OPTIONS":
|
||||
return "", 200
|
||||
@ -105,7 +108,7 @@ class RequestHandlers:
|
||||
# Setting a cookie, let's try to figure out the company
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
company = Token.decode_identity(value).company
|
||||
company = self._get_identity_from_encoded_token(value).company
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user