mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-17 23:38:17 +00:00
* Adding /version route. Fixes #2914 * Using a simple version string. * Use nginx rewriting to solve version. * Forgot to remove version. * Using an actix redirect.
This commit is contained in:
parent
5bfa4e9358
commit
1596aee724
|
@ -17,6 +17,7 @@ pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
"/nodeinfo/2.0.json",
|
"/nodeinfo/2.0.json",
|
||||||
web::get().to(node_info).wrap(cache_1hour()),
|
web::get().to(node_info).wrap(cache_1hour()),
|
||||||
)
|
)
|
||||||
|
.service(web::redirect("/version", "/nodeinfo/2.0.json"))
|
||||||
.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|version|.well-known) {
|
||||||
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