refactor(proxy): specify hosts for proxy exclusion instead of complete URLs (#6957)

This commit is contained in:
Sanchith Hegde
2025-01-15 17:39:37 +05:30
committed by GitHub
parent 1ec91e54e2
commit bd1f077057
10 changed files with 57 additions and 166 deletions

View File

@ -237,19 +237,9 @@ pub async fn start_server(conf: settings::Settings<SecuredSecret>) -> Applicatio
logger::debug!(startup_config=?conf);
let server = conf.server.clone();
let (tx, rx) = oneshot::channel();
let api_client = Box::new(
services::ProxyClient::new(
conf.proxy.clone(),
services::proxy_bypass_urls(
conf.key_manager.get_inner(),
&conf.locker,
&conf.proxy.bypass_proxy_urls,
),
)
.map_err(|error| {
errors::ApplicationError::ApiClientError(error.current_context().clone())
})?,
);
let api_client = Box::new(services::ProxyClient::new(&conf.proxy).map_err(|error| {
errors::ApplicationError::ApiClientError(error.current_context().clone())
})?);
let state = Box::pin(AppState::new(conf, tx, api_client)).await;
let request_body_limit = server.request_body_limit;