allow no ip
this shouldn't be needed, but is a workaround while we debug staging
This commit is contained in:
parent
7f4da8d43c
commit
63c4f9e591
@ -105,7 +105,7 @@ pub async fn user_deposits_get(
|
|||||||
#[debug_handler]
|
#[debug_handler]
|
||||||
pub async fn user_balance_post(
|
pub async fn user_balance_post(
|
||||||
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
||||||
InsecureClientIp(ip): InsecureClientIp,
|
ip: Option<InsecureClientIp>,
|
||||||
Path(mut params): Path<HashMap<String, String>>,
|
Path(mut params): Path<HashMap<String, String>>,
|
||||||
bearer: Option<TypedHeader<Authorization<Bearer>>>,
|
bearer: Option<TypedHeader<Authorization<Bearer>>>,
|
||||||
) -> Web3ProxyResponse {
|
) -> Web3ProxyResponse {
|
||||||
@ -117,10 +117,12 @@ pub async fn user_balance_post(
|
|||||||
let authorization = Web3ProxyAuthorization::internal(app.db_conn())?;
|
let authorization = Web3ProxyAuthorization::internal(app.db_conn())?;
|
||||||
|
|
||||||
(authorization, Some(semaphore))
|
(authorization, Some(semaphore))
|
||||||
} else {
|
} else if let Some(InsecureClientIp(ip)) = ip {
|
||||||
let authorization = login_is_authorized(&app, ip).await?;
|
let authorization = login_is_authorized(&app, ip).await?;
|
||||||
|
|
||||||
(authorization, None)
|
(authorization, None)
|
||||||
|
} else {
|
||||||
|
return Err(Web3ProxyError::AccessDenied);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get the transaction hash
|
// Get the transaction hash
|
||||||
|
Loading…
Reference in New Issue
Block a user