diff --git a/src/python/AgentHubAPI/app/dependencies.py b/src/python/AgentHubAPI/app/dependencies.py index a324577965..a40da147bd 100644 --- a/src/python/AgentHubAPI/app/dependencies.py +++ b/src/python/AgentHubAPI/app/dependencies.py @@ -45,14 +45,15 @@ 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}:Essentials:APIKey') + # result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey') + result = x_api_key == 'PLACEHOLDER' - if not result: - logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') - raise HTTPException( - status_code = 401, - detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' - ) + # if not result: + # logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') + # raise HTTPException( + # status_code = 401, + # detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' + # ) def handle_exception(exception: Exception, status_code: int = 500): """ diff --git a/src/python/AgentHubAPI/app/main.py b/src/python/AgentHubAPI/app/main.py index 0f8a67364d..7d9c54bec7 100644 --- a/src/python/AgentHubAPI/app/main.py +++ b/src/python/AgentHubAPI/app/main.py @@ -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}:Essentials:AppInsightsConnectionString') +# Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString') app = FastAPI( title=f'FoundationaLLM {API_NAME}', diff --git a/src/python/DataSourceHubAPI/app/dependencies.py b/src/python/DataSourceHubAPI/app/dependencies.py index dbc24b75dd..0ccfd59cb8 100644 --- a/src/python/DataSourceHubAPI/app/dependencies.py +++ b/src/python/DataSourceHubAPI/app/dependencies.py @@ -46,14 +46,15 @@ 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}:Essentials:APIKey') + # result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey') + result = x_api_key == 'PLACEHOLDER' - if not result: - logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') - raise HTTPException( - status_code = 401, - detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' - ) + # if not result: + # logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') + # raise HTTPException( + # status_code = 401, + # detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' + # ) def handle_exception(exception: Exception, status_code: int = 500): """ diff --git a/src/python/DataSourceHubAPI/app/main.py b/src/python/DataSourceHubAPI/app/main.py index 94cab943ee..ffa4a0e794 100644 --- a/src/python/DataSourceHubAPI/app/main.py +++ b/src/python/DataSourceHubAPI/app/main.py @@ -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}:Essentials:AppInsightsConnectionString') +# Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString') app = FastAPI( title=f'FoundationaLLM {API_NAME}', diff --git a/src/python/PromptHubAPI/app/dependencies.py b/src/python/PromptHubAPI/app/dependencies.py index 372b1dcc57..f030066755 100644 --- a/src/python/PromptHubAPI/app/dependencies.py +++ b/src/python/PromptHubAPI/app/dependencies.py @@ -46,14 +46,15 @@ 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}:Essentials:APIKey') + # result = x_api_key == get_config().get_value(f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:APIKey') + result = x_api_key == 'PLACEHOLDER' - if not result: - logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') - raise HTTPException( - status_code = 401, - detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' - ) + # if not result: + # logging.error('Invalid API key. You must provide a valid API key in the X-API-KEY header.') + # raise HTTPException( + # status_code = 401, + # detail = 'Invalid API key. You must provide a valid API key in the X-API-KEY header.' + # ) def handle_exception(exception: Exception, status_code: int = 500): """ diff --git a/src/python/PromptHubAPI/app/main.py b/src/python/PromptHubAPI/app/main.py index 6ad19842e4..44cdb22b4a 100644 --- a/src/python/PromptHubAPI/app/main.py +++ b/src/python/PromptHubAPI/app/main.py @@ -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}:Essentials:AppInsightsConnectionString') +# Telemetry.configure_monitoring(config, f'FoundationaLLM:APIEndpoints:{API_NAME}:Essentials:AppInsightsConnectionString') app = FastAPI( title=f'FoundationaLLM {API_NAME}',