mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-09 11:41:32 +00:00
move sitemap to top level, not in api
This commit is contained in:
parent
55b8aced9d
commit
460ccc8e5a
3 changed files with 7 additions and 9 deletions
|
@ -87,7 +87,6 @@ use lemmy_api::{
|
||||||
unread_count::get_unread_registration_application_count,
|
unread_count::get_unread_registration_application_count,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sitemap::get_sitemap,
|
|
||||||
};
|
};
|
||||||
use lemmy_api_crud::{
|
use lemmy_api_crud::{
|
||||||
comment::{
|
comment::{
|
||||||
|
@ -395,9 +394,4 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
|
||||||
.route("/delete", post().to(delete_custom_emoji)),
|
.route("/delete", post().to(delete_custom_emoji)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
cfg.service(
|
|
||||||
scope("/sitemap.xml")
|
|
||||||
.wrap(rate_limit.message())
|
|
||||||
.route("", get().to(get_sitemap)),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,6 @@ use lemmy_api::{
|
||||||
unread_count::get_unread_registration_application_count,
|
unread_count::get_unread_registration_application_count,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sitemap::get_sitemap,
|
|
||||||
};
|
};
|
||||||
use lemmy_api_crud::{
|
use lemmy_api_crud::{
|
||||||
comment::{
|
comment::{
|
||||||
|
@ -392,7 +391,6 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
|
||||||
.wrap(rate_limit.register())
|
.wrap(rate_limit.register())
|
||||||
.route("/authenticate", post().to(authenticate_with_oauth)),
|
.route("/authenticate", post().to(authenticate_with_oauth)),
|
||||||
)
|
)
|
||||||
.route("/sitemap.xml", get().to(get_sitemap))
|
|
||||||
.service(
|
.service(
|
||||||
scope("/image")
|
scope("/image")
|
||||||
.service(
|
.service(
|
||||||
|
|
|
@ -11,13 +11,14 @@ use actix_cors::Cors;
|
||||||
use actix_web::{
|
use actix_web::{
|
||||||
dev::{ServerHandle, ServiceResponse},
|
dev::{ServerHandle, ServiceResponse},
|
||||||
middleware::{self, Condition, ErrorHandlerResponse, ErrorHandlers},
|
middleware::{self, Condition, ErrorHandlerResponse, ErrorHandlers},
|
||||||
web::Data,
|
web::{get, scope, Data},
|
||||||
App,
|
App,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
HttpServer,
|
HttpServer,
|
||||||
};
|
};
|
||||||
use actix_web_prom::PrometheusMetricsBuilder;
|
use actix_web_prom::PrometheusMetricsBuilder;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use lemmy_api::sitemap::get_sitemap;
|
||||||
use lemmy_api_common::{
|
use lemmy_api_common::{
|
||||||
context::LemmyContext,
|
context::LemmyContext,
|
||||||
lemmy_db_views::structs::SiteView,
|
lemmy_db_views::structs::SiteView,
|
||||||
|
@ -324,6 +325,11 @@ fn create_http_server(
|
||||||
})
|
})
|
||||||
.configure(feeds::config)
|
.configure(feeds::config)
|
||||||
.configure(nodeinfo::config)
|
.configure(nodeinfo::config)
|
||||||
|
.service(
|
||||||
|
scope("/sitemap.xml")
|
||||||
|
.wrap(rate_limit_cell.message())
|
||||||
|
.route("", get().to(get_sitemap)),
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.disable_signals()
|
.disable_signals()
|
||||||
.bind(bind)?
|
.bind(bind)?
|
||||||
|
|
Loading…
Reference in a new issue