Add nodeinfo to well known
Dependencies
- [2]
HRNW7A47Add nodeinfo - [3]
XS5FAAN4Add well-known host-meta page - [4]
YXH3KDBRAdd initial webfinger - [5]
WLWTNO4YCreate form to request game password change link - [6]
HZDCKIXQUse constants for templates - [*]
4MZ4VIR7Initial commit
Change contents
- replacement in src/pages/well_known.rs at line 21
pub async fn nodeinfo() -> HttpResponse {pub async fn nodeinfo20() -> HttpResponse { - edit in src/pages/well_known.rs at line 49
}pub async fn nodeinfo(data: web::Data<WebData<'_>>) -> HttpResponse {HttpResponse::Ok().insert_header(("Content-Type", "application/jrd+json")).insert_header(("Date",chrono::Utc::now().format("%a, %d %b %Y %H:%M:%S GMT").to_string(),)).body(format!(r#"{{"links": [{{"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0","href": "{}://{}/nodeinfo/2.0"}}]}}"#,data.base_proto, data.base_domain)) - replacement in src/main.rs at line 180
.route("/nodeinfo/2.0", web::get().to(well_known::nodeinfo)).route("/nodeinfo/2.0", web::get().to(well_known::nodeinfo20)).route("/.well-known/nodeinfo", web::get().to(well_known::nodeinfo))