mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-24 11:51:32 +00:00
move rate limit
This commit is contained in:
parent
12ef9a0771
commit
b59e19de1b
2 changed files with 1 additions and 1 deletions
|
@ -162,6 +162,7 @@ use lemmy_utils::rate_limit::RateLimitCell;
|
|||
pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
|
||||
cfg.service(
|
||||
web::scope("/api/v4")
|
||||
.wrap(rate_limit.message())
|
||||
.route("/image_proxy", web::get().to(image_proxy))
|
||||
// Site
|
||||
.service(
|
||||
|
|
|
@ -297,7 +297,6 @@ fn create_http_server(
|
|||
let server = HttpServer::new(move || {
|
||||
let cors_config = cors_config(&settings);
|
||||
let app = App::new()
|
||||
.wrap(rate_limit_cell.message())
|
||||
.wrap(middleware::Logger::new(
|
||||
// This is the default log format save for the usage of %{r}a over %a to guarantee to
|
||||
// record the client's (forwarded) IP and not the last peer address, since the latter is
|
||||
|
|
Loading…
Reference in a new issue