mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 04:41:02 +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) {
|
pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
|
||||||
cfg.service(
|
cfg.service(
|
||||||
web::scope("/api/v4")
|
web::scope("/api/v4")
|
||||||
|
.wrap(rate_limit.message())
|
||||||
.route("/image_proxy", web::get().to(image_proxy))
|
.route("/image_proxy", web::get().to(image_proxy))
|
||||||
// Site
|
// Site
|
||||||
.service(
|
.service(
|
||||||
|
|
|
@ -297,7 +297,6 @@ fn create_http_server(
|
||||||
let server = HttpServer::new(move || {
|
let server = HttpServer::new(move || {
|
||||||
let cors_config = cors_config(&settings);
|
let cors_config = cors_config(&settings);
|
||||||
let app = App::new()
|
let app = App::new()
|
||||||
.wrap(rate_limit_cell.message())
|
|
||||||
.wrap(middleware::Logger::new(
|
.wrap(middleware::Logger::new(
|
||||||
// This is the default log format save for the usage of %{r}a over %a to guarantee to
|
// 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
|
// record the client's (forwarded) IP and not the last peer address, since the latter is
|
||||||
|
|
Loading…
Reference in a new issue