mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
feat: add admin api key install sessions
This commit is contained in:
@@ -30,6 +30,7 @@ pub(super) async fn maybe_build_local_internal_proxy_response(
|
||||
pub(super) async fn maybe_build_local_admin_proxy_response(
|
||||
state: &AppState,
|
||||
request_context: &GatewayPublicRequestContext,
|
||||
request_headers: &http::HeaderMap,
|
||||
request_body: Option<&Bytes>,
|
||||
) -> Result<Option<Response<Body>>, GatewayError> {
|
||||
let Some(decision) = request_context.control_decision.as_ref() else {
|
||||
@@ -49,6 +50,7 @@ pub(super) async fn maybe_build_local_admin_proxy_response(
|
||||
admin_api::maybe_build_local_admin_response(admin_api::AdminRouteRequest::new(
|
||||
state,
|
||||
request_context,
|
||||
request_headers,
|
||||
request_body,
|
||||
))
|
||||
.await
|
||||
|
||||
@@ -874,9 +874,13 @@ pub(crate) async fn proxy_request(
|
||||
request_permit.take(),
|
||||
));
|
||||
}
|
||||
if let Some(response) =
|
||||
maybe_build_local_admin_proxy_response(&state, &request_context, local_proxy_body.as_ref())
|
||||
.await?
|
||||
if let Some(response) = maybe_build_local_admin_proxy_response(
|
||||
&state,
|
||||
&request_context,
|
||||
&parts.headers,
|
||||
local_proxy_body.as_ref(),
|
||||
)
|
||||
.await?
|
||||
{
|
||||
let execution_path =
|
||||
resolve_local_proxy_execution_path(&response, EXECUTION_PATH_PUBLIC_PROXY_PASSTHROUGH);
|
||||
|
||||
Reference in New Issue
Block a user