Skip to content

Commit 10ee794

Browse files
authored
Merge branch 'develop' into enhancement/user-conversion
2 parents c60094f + 9c1c0e1 commit 10ee794

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ayon_api/server_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
NOT_SET,
9797
get_media_mime_type,
9898
SortOrder,
99+
get_machine_name,
99100
)
100101

101102
if typing.TYPE_CHECKING:
@@ -1263,7 +1264,7 @@ def get_headers(
12631264
headers = {
12641265
"Content-Type": content_type,
12651266
"x-ayon-platform": platform.system().lower(),
1266-
"x-ayon-hostname": platform.node(),
1267+
"x-ayon-hostname": get_machine_name(),
12671268
"referer": self.get_base_url(),
12681269
}
12691270
if self._site_id is not None:

ayon_api/utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ def get_default_settings_variant() -> str:
8989
return os.environ.get(DEFAULT_VARIANT_ENV_KEY) or "production"
9090

9191

92+
def get_machine_name() -> str:
93+
"""Get machine name.
94+
95+
Returns:
96+
str: Machine name.
97+
98+
"""
99+
return platform.node()
100+
return unidecode.unidecode(platform.node())
101+
102+
92103
def get_default_site_id() -> Optional[str]:
93104
"""Site id used for server connection.
94105

0 commit comments

Comments
 (0)