Adding /version route. Fixes #2914

This commit is contained in:
Dessalines 2023-10-18 16:34:56 -04:00
parent a675fecacd
commit bea1408b65
2 changed files with 4 additions and 5 deletions

View file

@ -12,11 +12,10 @@ use serde::{Deserialize, Serialize};
use url::Url;
pub fn config(cfg: &mut web::ServiceConfig) {
let nodeinfo_json_route = || web::get().to(node_info).wrap(cache_1hour());
cfg
.route(
"/nodeinfo/2.0.json",
web::get().to(node_info).wrap(cache_1hour()),
)
.route("/nodeinfo/2.0.json", nodeinfo_json_route())
.route("/version", nodeinfo_json_route())
.route(
"/.well-known/nodeinfo",
web::get().to(node_info_well_known).wrap(cache_3days()),

View file

@ -56,7 +56,7 @@ http {
}
# backend
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known|version) {
proxy_pass "http://lemmy";
# proxy common stuff
proxy_http_version 1.1;