mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 02:20:42 +00:00
fix: require wider jwt for changing the io engine (#6770)
io-engine should not be changeable with any JWT token, for example the tenant_id scoped token which computes have.
This commit is contained in:
@@ -1951,6 +1951,7 @@ async fn put_io_engine_handler(
|
||||
mut r: Request<Body>,
|
||||
_cancel: CancellationToken,
|
||||
) -> Result<Response<Body>, ApiError> {
|
||||
check_permission(&r, None)?;
|
||||
let kind: crate::virtual_file::IoEngineKind = json_request(&mut r).await?;
|
||||
crate::virtual_file::io_engine::set(kind);
|
||||
json_response(StatusCode::OK, ())
|
||||
|
||||
Reference in New Issue
Block a user