mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Merge branch 'main' into clear_deleted_posts_comments
This commit is contained in:
commit
418bca78e1
11 changed files with 66 additions and 116 deletions
|
@ -2,7 +2,7 @@
|
||||||
# See https://github.com/woodpecker-ci/woodpecker/issues/1677
|
# See https://github.com/woodpecker-ci/woodpecker/issues/1677
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &muslrust_image "clux/muslrust:1.67.0"
|
- &muslrust_image "clux/muslrust:1.70.0"
|
||||||
|
|
||||||
# Broken for cron jobs currently, see
|
# Broken for cron jobs currently, see
|
||||||
# https://github.com/woodpecker-ci/woodpecker/issues/1716
|
# https://github.com/woodpecker-ci/woodpecker/issues/1716
|
||||||
|
|
93
Cargo.lock
generated
93
Cargo.lock
generated
|
@ -14,15 +14,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "activitypub_federation"
|
name = "activitypub_federation"
|
||||||
version = "0.4.1"
|
version = "0.4.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f85cab86a72489b908adfeec61a4f104124b01784b9a5bb721c988727c363dad"
|
checksum = "27540f6c4b72c91176610ed5279061a021387f972c7c6f42c41032b78a808267"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitystreams-kinds",
|
"activitystreams-kinds",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"background-jobs",
|
|
||||||
"base64 0.21.2",
|
"base64 0.21.2",
|
||||||
"bytes",
|
"bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -46,6 +45,7 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
@ -418,15 +418,6 @@ dependencies = [
|
||||||
"syn 1.0.103",
|
"syn 1.0.103",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "async-mutex"
|
|
||||||
version = "1.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
|
|
||||||
dependencies = [
|
|
||||||
"event-listener",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-stream"
|
name = "async-stream"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
@ -602,56 +593,6 @@ dependencies = [
|
||||||
"tower-service",
|
"tower-service",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "background-jobs"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "793a813f9145c5f3a27b8dcd834c0927de68bbd60d53a369e5894f3cc5759020"
|
|
||||||
dependencies = [
|
|
||||||
"background-jobs-actix",
|
|
||||||
"background-jobs-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "background-jobs-actix"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8660626a2d8781b50cbe0e3b63d8e2a7e08a90e80fa2bca8e8cc19deff72ebf4"
|
|
||||||
dependencies = [
|
|
||||||
"actix-rt",
|
|
||||||
"anyhow",
|
|
||||||
"async-mutex",
|
|
||||||
"async-trait",
|
|
||||||
"background-jobs-core",
|
|
||||||
"num_cpus",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"thiserror",
|
|
||||||
"tokio",
|
|
||||||
"tracing",
|
|
||||||
"tracing-futures",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "background-jobs-core"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "48e78e842fe2ae461319e3d1843c12e301630e65650332b02032ac70b0dfc66f"
|
|
||||||
dependencies = [
|
|
||||||
"actix-rt",
|
|
||||||
"anyhow",
|
|
||||||
"async-trait",
|
|
||||||
"event-listener",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"thiserror",
|
|
||||||
"time 0.3.15",
|
|
||||||
"tracing",
|
|
||||||
"tracing-futures",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "backtrace"
|
name = "backtrace"
|
||||||
version = "0.3.67"
|
version = "0.3.67"
|
||||||
|
@ -1762,12 +1703,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "event-listener"
|
|
||||||
version = "2.5.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "eyre"
|
name = "eyre"
|
||||||
version = "0.6.8"
|
version = "0.6.8"
|
||||||
|
@ -2583,7 +2518,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api"
|
name = "lemmy_api"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
@ -2606,7 +2541,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api_common"
|
name = "lemmy_api_common"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-rt",
|
"actix-rt",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2635,7 +2570,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api_crud"
|
name = "lemmy_api_crud"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2654,7 +2589,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_apub"
|
name = "lemmy_apub"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-rt",
|
"actix-rt",
|
||||||
|
@ -2692,7 +2627,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_schema"
|
name = "lemmy_db_schema"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -2724,7 +2659,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views"
|
name = "lemmy_db_views"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel-async",
|
"diesel-async",
|
||||||
|
@ -2741,7 +2676,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views_actor"
|
name = "lemmy_db_views_actor"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel-async",
|
"diesel-async",
|
||||||
|
@ -2754,7 +2689,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views_moderator"
|
name = "lemmy_db_views_moderator"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel-async",
|
"diesel-async",
|
||||||
|
@ -2766,7 +2701,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_routes"
|
name = "lemmy_routes"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2791,7 +2726,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_server"
|
name = "lemmy_server"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
|
@ -2828,7 +2763,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_utils"
|
name = "lemmy_utils"
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|
24
Cargo.toml
24
Cargo.toml
|
@ -1,5 +1,5 @@
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.18.0-rc.5"
|
version = "0.18.0-rc.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A link aggregator for the fediverse"
|
description = "A link aggregator for the fediverse"
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
|
@ -49,17 +49,17 @@ members = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lemmy_api = { version = "=0.18.0-rc.5", path = "./crates/api" }
|
lemmy_api = { version = "=0.18.0-rc.6", path = "./crates/api" }
|
||||||
lemmy_api_crud = { version = "=0.18.0-rc.5", path = "./crates/api_crud" }
|
lemmy_api_crud = { version = "=0.18.0-rc.6", path = "./crates/api_crud" }
|
||||||
lemmy_apub = { version = "=0.18.0-rc.5", path = "./crates/apub" }
|
lemmy_apub = { version = "=0.18.0-rc.6", path = "./crates/apub" }
|
||||||
lemmy_utils = { version = "=0.18.0-rc.5", path = "./crates/utils" }
|
lemmy_utils = { version = "=0.18.0-rc.6", path = "./crates/utils" }
|
||||||
lemmy_db_schema = { version = "=0.18.0-rc.5", path = "./crates/db_schema" }
|
lemmy_db_schema = { version = "=0.18.0-rc.6", path = "./crates/db_schema" }
|
||||||
lemmy_api_common = { version = "=0.18.0-rc.5", path = "./crates/api_common" }
|
lemmy_api_common = { version = "=0.18.0-rc.6", path = "./crates/api_common" }
|
||||||
lemmy_routes = { version = "=0.18.0-rc.5", path = "./crates/routes" }
|
lemmy_routes = { version = "=0.18.0-rc.6", path = "./crates/routes" }
|
||||||
lemmy_db_views = { version = "=0.18.0-rc.5", path = "./crates/db_views" }
|
lemmy_db_views = { version = "=0.18.0-rc.6", path = "./crates/db_views" }
|
||||||
lemmy_db_views_actor = { version = "=0.18.0-rc.5", path = "./crates/db_views_actor" }
|
lemmy_db_views_actor = { version = "=0.18.0-rc.6", path = "./crates/db_views_actor" }
|
||||||
lemmy_db_views_moderator = { version = "=0.18.0-rc.5", path = "./crates/db_views_moderator" }
|
lemmy_db_views_moderator = { version = "=0.18.0-rc.6", path = "./crates/db_views_moderator" }
|
||||||
activitypub_federation = { version = "0.4.1", default-features = false, features = ["actix-web"] }
|
activitypub_federation = { version = "0.4.4", default-features = false, features = ["actix-web"] }
|
||||||
diesel = "2.1.0"
|
diesel = "2.1.0"
|
||||||
diesel_migrations = "2.1.0"
|
diesel_migrations = "2.1.0"
|
||||||
diesel-async = "0.3.1"
|
diesel-async = "0.3.1"
|
||||||
|
|
16
README.md
16
README.md
|
@ -30,7 +30,7 @@
|
||||||
<br />
|
<br />
|
||||||
<a href="https://join-lemmy.org">Join Lemmy</a>
|
<a href="https://join-lemmy.org">Join Lemmy</a>
|
||||||
·
|
·
|
||||||
<a href="https://join-lemmy.org/docs/en/index.html">Documentation</a>
|
<a href="https://join-lemmy.org/docs/index.html">Documentation</a>
|
||||||
·
|
·
|
||||||
<a href="https://matrix.to/#/#lemmy-space:matrix.org">Matrix Chat</a>
|
<a href="https://matrix.to/#/#lemmy-space:matrix.org">Matrix Chat</a>
|
||||||
·
|
·
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
·
|
·
|
||||||
<a href="https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md">Releases</a>
|
<a href="https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md">Releases</a>
|
||||||
·
|
·
|
||||||
<a href="https://join-lemmy.org/docs/en/code_of_conduct.html">Code of Conduct</a>
|
<a href="https://join-lemmy.org/docs/code_of_conduct.html">Code of Conduct</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Each Lemmy server can set its own moderation policy; appointing site-wide admins
|
||||||
|
|
||||||
- Open source, [AGPL License](/LICENSE).
|
- Open source, [AGPL License](/LICENSE).
|
||||||
- Self hostable, easy to deploy.
|
- Self hostable, easy to deploy.
|
||||||
- Comes with [Docker](https://join-lemmy.org/docs/en/administration/install_docker.html) and [Ansible](https://join-lemmy.org/docs/en/administration/install_ansible.html).
|
- Comes with [Docker](https://join-lemmy.org/docs/administration/install_docker.html) and [Ansible](https://join-lemmy.org/docs/administration/install_ansible.html).
|
||||||
- Clean, mobile-friendly interface.
|
- Clean, mobile-friendly interface.
|
||||||
- Only a minimum of a username and password is required to sign up!
|
- Only a minimum of a username and password is required to sign up!
|
||||||
- User avatar support.
|
- User avatar support.
|
||||||
|
@ -111,8 +111,8 @@ Each Lemmy server can set its own moderation policy; appointing site-wide admins
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- [Docker](https://join-lemmy.org/docs/en/administration/install_docker.html)
|
- [Docker](https://join-lemmy.org/docs/administration/install_docker.html)
|
||||||
- [Ansible](https://join-lemmy.org/docs/en/administration/install_ansible.html)
|
- [Ansible](https://join-lemmy.org/docs/administration/install_ansible.html)
|
||||||
|
|
||||||
## Lemmy Projects
|
## Lemmy Projects
|
||||||
|
|
||||||
|
@ -154,9 +154,9 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
- [Contributing instructions](https://join-lemmy.org/docs/en/contributors/01-overview.html)
|
- [Contributing instructions](https://join-lemmy.org/docs/contributors/01-overview.html)
|
||||||
- [Docker Development](https://join-lemmy.org/docs/en/contributors/03-docker-development.html)
|
- [Docker Development](https://join-lemmy.org/docs/contributors/03-docker-development.html)
|
||||||
- [Local Development](https://join-lemmy.org/docs/en/contributors/02-local-development.html)
|
- [Local Development](https://join-lemmy.org/docs/contributors/02-local-development.html)
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,7 @@ pub(crate) mod tests {
|
||||||
.domain("example.com")
|
.domain("example.com")
|
||||||
.app_data(context)
|
.app_data(context)
|
||||||
.build()
|
.build()
|
||||||
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
config.to_request_data()
|
config.to_request_data()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM clux/muslrust:1.67.0 as builder
|
FROM clux/muslrust:1.70.0 as builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ARG CARGO_BUILD_TARGET=x86_64-unknown-linux-musl
|
ARG CARGO_BUILD_TARGET=x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: "3.3"
|
version: "3.7"
|
||||||
|
|
||||||
x-logging: &default-logging
|
x-logging: &default-logging
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
|
@ -80,6 +80,7 @@ services:
|
||||||
- lemmy
|
- lemmy
|
||||||
restart: always
|
restart: always
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
init: true
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:0.4.0-beta.19
|
image: asonix/pictrs:0.4.0-beta.19
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
version: "3.3"
|
version: "3.7"
|
||||||
|
|
||||||
x-ui-default: &ui-default
|
x-ui-default: &ui-default
|
||||||
|
init: true
|
||||||
image: dessalines/lemmy-ui:0.17.3
|
image: dessalines/lemmy-ui:0.17.3
|
||||||
# assuming lemmy-ui is cloned besides lemmy directory
|
# assuming lemmy-ui is cloned besides lemmy directory
|
||||||
# build:
|
# build:
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- Add a no-op statement to prevent `diesel migration redo` errors
|
||||||
|
SELECT 1;
|
|
@ -0,0 +1,5 @@
|
||||||
|
update community c
|
||||||
|
set local=true
|
||||||
|
from local_site ls
|
||||||
|
join site s on ls.site_id=s.id
|
||||||
|
where c.instance_id=s.instance_id and not c.local;
|
19
src/lib.rs
19
src/lib.rs
|
@ -139,22 +139,24 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Http server with websocket support
|
|
||||||
let settings_bind = settings.clone();
|
|
||||||
HttpServer::new(move || {
|
|
||||||
let context = context.clone();
|
|
||||||
let federation_config = FederationConfig::builder()
|
let federation_config = FederationConfig::builder()
|
||||||
.domain(settings.hostname.clone())
|
.domain(settings.hostname.clone())
|
||||||
.app_data(context.clone())
|
.app_data(context.clone())
|
||||||
.client(client.clone())
|
.client(client.clone())
|
||||||
.http_fetch_limit(FEDERATION_HTTP_FETCH_LIMIT)
|
.http_fetch_limit(FEDERATION_HTTP_FETCH_LIMIT)
|
||||||
.worker_count(local_site.federation_worker_count as u64)
|
.worker_count(local_site.federation_worker_count as usize)
|
||||||
.debug(cfg!(debug_assertions))
|
.debug(cfg!(debug_assertions))
|
||||||
.http_signature_compat(true)
|
.http_signature_compat(true)
|
||||||
.url_verifier(Box::new(VerifyUrlData(context.pool().clone())))
|
.url_verifier(Box::new(VerifyUrlData(context.pool().clone())))
|
||||||
.build()
|
.build()
|
||||||
|
.await
|
||||||
.expect("configure federation");
|
.expect("configure federation");
|
||||||
|
|
||||||
|
// Create Http server with websocket support
|
||||||
|
let settings_bind = settings.clone();
|
||||||
|
HttpServer::new(move || {
|
||||||
|
let context = context.clone();
|
||||||
|
|
||||||
let cors_config = if cfg!(debug_assertions) {
|
let cors_config = if cfg!(debug_assertions) {
|
||||||
Cors::permissive()
|
Cors::permissive()
|
||||||
} else {
|
} else {
|
||||||
|
@ -165,12 +167,15 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> {
|
||||||
};
|
};
|
||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(middleware::Logger::default())
|
.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 frequently just a reverse proxy
|
||||||
|
"%{r}a '%r' %s %b '%{Referer}i' '%{User-Agent}i' %T",
|
||||||
|
))
|
||||||
.wrap(cors_config)
|
.wrap(cors_config)
|
||||||
.wrap(TracingLogger::<QuieterRootSpanBuilder>::new())
|
.wrap(TracingLogger::<QuieterRootSpanBuilder>::new())
|
||||||
.app_data(Data::new(context))
|
.app_data(Data::new(context))
|
||||||
.app_data(Data::new(rate_limit_cell.clone()))
|
.app_data(Data::new(rate_limit_cell.clone()))
|
||||||
.wrap(FederationMiddleware::new(federation_config))
|
.wrap(FederationMiddleware::new(federation_config.clone()))
|
||||||
// The routes
|
// The routes
|
||||||
.configure(|cfg| api_routes_http::config(cfg, rate_limit_cell))
|
.configure(|cfg| api_routes_http::config(cfg, rate_limit_cell))
|
||||||
.configure(|cfg| {
|
.configure(|cfg| {
|
||||||
|
|
Loading…
Reference in a new issue