mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-03 00:31:58 +00:00
Adding /version route. Fixes #2914
This commit is contained in:
parent
a675fecacd
commit
bea1408b65
2 changed files with 4 additions and 5 deletions
|
@ -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()),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue