Skip to content

Commit

Permalink
Merge pull request #1326 from solliancenet/mg-t18418
Browse files Browse the repository at this point in the history
  • Loading branch information
ciprianjichici authored Aug 1, 2024
2 parents 117d1ae + 98687f4 commit f693b86
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/python/AgentHubAPI/app/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def validate_api_key_header(x_api_key: str = Depends(APIKeyHeader(name='X-API-Ke
Returns True of the X-API-Key value from the request header matches the expected value.
Otherwise, returns False.
"""
result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:APIKey')
result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey')

if not result:
logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.')
Expand Down
2 changes: 1 addition & 1 deletion src/python/AgentHubAPI/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Open a connection to the app configuration
config = get_config()
# Start collecting telemetry
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:AppInsightsConnectionString')
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString')

app = FastAPI(
title=f'FoundationaLLM {API_NAME}',
Expand Down
2 changes: 1 addition & 1 deletion src/python/DataSourceHubAPI/app/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def validate_api_key_header(x_api_key: str = Depends(APIKeyHeader(name='X-API-Ke
Otherwise, returns False.
"""

result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:APIKey')
result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey')

if not result:
logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.')
Expand Down
2 changes: 1 addition & 1 deletion src/python/DataSourceHubAPI/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Open a connection to the app configuration
config = get_config()
# Start collecting telemetry
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:AppInsightsConnectionString')
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString')

app = FastAPI(
title=f'FoundationaLLM {API_NAME}',
Expand Down
2 changes: 1 addition & 1 deletion src/python/PromptHubAPI/app/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def validate_api_key_header(x_api_key: str = Depends(APIKeyHeader(name='X-API-Ke
Otherwise, returns False.
"""

result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:APIKey')
result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey')

if not result:
logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.')
Expand Down
2 changes: 1 addition & 1 deletion src/python/PromptHubAPI/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Open a connection to the app configuration
config = get_config()
# Start collecting telemetry
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:AppInsightsConnectionString')
Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString')

app = FastAPI(
title=f'FoundationaLLM {API_NAME}',
Expand Down

0 comments on commit f693b86

Please sign in to comment.