mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
serve well-known client and server config
This way users can have a simpler time configuring this stuff and we can worry about the spec compliance parts and specifying the same thing over and over parts.
This commit is contained in:
parent
3a55684623
commit
806cc0cb28
4 changed files with 99 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ mod service;
|
|||
mod utils;
|
||||
|
||||
pub(crate) use api::ruma_wrapper::{Ar, Ra};
|
||||
use api::{client_server, server_server};
|
||||
use api::{client_server, server_server, well_known};
|
||||
pub(crate) use config::{Config, ListenConfig};
|
||||
pub(crate) use database::KeyValueDatabase;
|
||||
pub(crate) use service::{pdu::PduEvent, Services};
|
||||
|
|
@ -491,6 +491,10 @@ fn routes(config: &Config) -> Router {
|
|||
.route("/", get(it_works))
|
||||
.fallback(not_found);
|
||||
|
||||
let router = router
|
||||
.route("/.well-known/matrix/client", get(well_known::client))
|
||||
.route("/.well-known/matrix/server", get(well_known::server));
|
||||
|
||||
if config.federation.enable {
|
||||
router
|
||||
.ruma_route(s2s::get_server_version_route)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue