diff --git a/include/ircd/resource.h b/include/ircd/resource.h index 96061c50f..df74a24e5 100644 --- a/include/ircd/resource.h +++ b/include/ircd/resource.h @@ -94,6 +94,7 @@ struct ircd::resource::request vector_view parv; string_view param[8]; m::user::id::buf user_id; + m::node::id::buf node_id; request(const http::request::head &head, const string_view &content) @@ -116,6 +117,7 @@ struct ircd::resource::request::object const http::query::string &query; const decltype(r.origin) &origin; const decltype(r.user_id) &user_id; + const decltype(r.node_id) &node_id; const decltype(r.access_token) &access_token; const vector_view &parv; const json::object &body; @@ -128,6 +130,7 @@ struct ircd::resource::request::object ,query{r.query} ,origin{r.origin} ,user_id{r.user_id} + ,node_id{r.node_id} ,access_token{r.access_token} ,parv{r.parv} ,body{r} diff --git a/ircd/resource.cc b/ircd/resource.cc index d2463a19a..7340c0524 100644 --- a/ircd/resource.cc +++ b/ircd/resource.cc @@ -207,7 +207,8 @@ try object.verify(x_matrix.key, x_matrix.sig) }; - request.origin = x_matrix.origin; + request.node_id = {"", x_matrix.origin}; + request.origin = request.node_id.host(); return verified; } catch(const std::exception &e)