File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
services/web/server/src/simcore_service_webserver/api_keys/_controller Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,11 @@ class ApiKeysPathParams(StrictRequestParameters):
3737 api_key_id : IDStr
3838
3939
40- def _get_api_base_url (request : web .Request ) -> str :
41- originating_host = next (iter_originating_hosts (request ))
40+ def _get_api_base_url (request : web .Request ) -> str | None :
41+ originating_host = next (iter_originating_hosts (request ), None )
42+ if not originating_host :
43+ return None
44+
4245 api_host = (
4346 f"api.{ originating_host } "
4447 if not is_ip_address (originating_host )
@@ -66,7 +69,7 @@ async def create_api_key(request: web.Request):
6669 api_key = ApiKeyCreateResponse .model_validate (
6770 {
6871 ** asdict (created_api_key ),
69- "api_base_url" : _get_api_base_url (request ),
72+ "api_base_url" : _get_api_base_url (request ) or "" ,
7073 }
7174 )
7275
You can’t perform that action at this time.
0 commit comments