mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
update cargo deps (#2959)
* update cargo deps * readd device info header
This commit is contained in:
@@ -19,6 +19,7 @@ use crate::context::config::{ContextConfig, CONFIG_PATH};
|
||||
use crate::context::{CliContext, RpcContext};
|
||||
use crate::prelude::*;
|
||||
use crate::registry::auth::{SignatureHeader, AUTH_SIG_HEADER};
|
||||
use crate::registry::device_info::{DeviceInfo, DEVICE_INFO_HEADER};
|
||||
use crate::registry::signer::sign::AnySigningKey;
|
||||
use crate::registry::RegistryDatabase;
|
||||
use crate::rpc_continuations::RpcContinuations;
|
||||
@@ -254,7 +255,10 @@ impl CallRemote<RegistryContext, RegistryUrlParams> for RpcContext {
|
||||
.header(CONTENT_TYPE, "application/json")
|
||||
.header(ACCEPT, "application/json")
|
||||
.header(CONTENT_LENGTH, body.len())
|
||||
// .header(DEVICE_INFO_HEADER, DeviceInfo::from(self).to_header_value())
|
||||
.header(
|
||||
DEVICE_INFO_HEADER,
|
||||
DeviceInfo::load(self).await?.to_header_value(),
|
||||
)
|
||||
.body(body)
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
@@ -90,7 +90,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
|
||||
use axum::extract as x;
|
||||
use axum::routing::{any, get};
|
||||
Router::new()
|
||||
.route("/rpc/*path", {
|
||||
.route("/rpc/{*path}", {
|
||||
let ctx = ctx.clone();
|
||||
any(
|
||||
Server::new(move || ready(Ok(ctx.clone())), registry_api())
|
||||
@@ -100,7 +100,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
|
||||
)
|
||||
})
|
||||
.route(
|
||||
"/ws/rpc/*path",
|
||||
"/ws/rpc/{*path}",
|
||||
get({
|
||||
let ctx = ctx.clone();
|
||||
move |x::Path(path): x::Path<String>,
|
||||
@@ -119,7 +119,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
|
||||
}),
|
||||
)
|
||||
.route(
|
||||
"/rest/rpc/*path",
|
||||
"/rest/rpc/{*path}",
|
||||
any({
|
||||
let ctx = ctx.clone();
|
||||
move |request: x::Request| async move {
|
||||
|
||||
Reference in New Issue
Block a user