mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-07-09 23:45:47 +00:00
Adding /version route. Fixes #2914
This commit is contained in:
parent
a675fecacd
commit
bea1408b65
|
@ -12,11 +12,10 @@ use serde::{Deserialize, Serialize};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
pub fn config(cfg: &mut web::ServiceConfig) {
|
pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
|
let nodeinfo_json_route = || web::get().to(node_info).wrap(cache_1hour());
|
||||||
cfg
|
cfg
|
||||||
.route(
|
.route("/nodeinfo/2.0.json", nodeinfo_json_route())
|
||||||
"/nodeinfo/2.0.json",
|
.route("/version", nodeinfo_json_route())
|
||||||
web::get().to(node_info).wrap(cache_1hour()),
|
|
||||||
)
|
|
||||||
.route(
|
.route(
|
||||||
"/.well-known/nodeinfo",
|
"/.well-known/nodeinfo",
|
||||||
web::get().to(node_info_well_known).wrap(cache_3days()),
|
web::get().to(node_info_well_known).wrap(cache_3days()),
|
||||||
|
|
|
@ -56,7 +56,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# backend
|
# backend
|
||||||
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
|
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known|version) {
|
||||||
proxy_pass "http://lemmy";
|
proxy_pass "http://lemmy";
|
||||||
# proxy common stuff
|
# proxy common stuff
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
Loading…
Reference in a new issue