mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-29 09:29:11 +00:00
Compare commits
2 Commits
bc98d1be42
...
b2f5d5486c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2f5d5486c | ||
|
|
db674d5895 |
22
Cargo.lock
generated
22
Cargo.lock
generated
@@ -3017,7 +3017,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
@@ -3060,7 +3060,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_caldav"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"async-trait",
|
||||
@@ -3100,7 +3100,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_carddav"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
@@ -3132,7 +3132,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_dav"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
@@ -3157,7 +3157,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_dav_push"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
@@ -3182,7 +3182,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_frontend"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"askama_web",
|
||||
@@ -3215,7 +3215,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_ical"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -3233,7 +3233,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_oidc"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
@@ -3248,7 +3248,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_store"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -3282,7 +3282,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_store_sqlite"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
@@ -3303,7 +3303,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustical_xml"
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
dependencies = [
|
||||
"quick-xml",
|
||||
"thiserror 2.0.16",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
members = ["crates/*"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.9.4"
|
||||
version = "0.9.5"
|
||||
edition = "2024"
|
||||
description = "A CalDAV server"
|
||||
documentation = "https://lennart-k.github.io/rustical/"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::config::NextcloudLoginConfig;
|
||||
use axum::Router;
|
||||
use axum::body::{Body, HttpBody};
|
||||
use axum::extract::Request;
|
||||
use axum::extract::{DefaultBodyLimit, Request};
|
||||
use axum::middleware::Next;
|
||||
use axum::response::{Redirect, Response};
|
||||
use axum::routing::{any, options};
|
||||
@@ -39,6 +39,7 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
nextcloud_login_config: NextcloudLoginConfig,
|
||||
dav_push_enabled: bool,
|
||||
session_cookie_samesite_strict: bool,
|
||||
payload_limit_mb: usize,
|
||||
) -> Router<()> {
|
||||
let birthday_store = Arc::new(ContactBirthdayStore::new(addr_store.clone()));
|
||||
let combined_cal_store =
|
||||
@@ -202,4 +203,5 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
response
|
||||
},
|
||||
))
|
||||
.layer(DefaultBodyLimit::max(payload_limit_mb * 1000 * 1000))
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ pub struct HttpConfig {
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
pub session_cookie_samesite_strict: bool,
|
||||
pub payload_limit_mb: usize,
|
||||
}
|
||||
|
||||
impl Default for HttpConfig {
|
||||
@@ -16,6 +17,7 @@ impl Default for HttpConfig {
|
||||
host: "0.0.0.0".to_owned(),
|
||||
port: 4000,
|
||||
session_cookie_samesite_strict: false,
|
||||
payload_limit_mb: 4,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ async fn main() -> Result<()> {
|
||||
config.nextcloud_login.clone(),
|
||||
config.dav_push.enabled,
|
||||
config.http.session_cookie_samesite_strict,
|
||||
config.http.payload_limit_mb,
|
||||
);
|
||||
let app = ServiceExt::<Request>::into_make_service(
|
||||
NormalizePathLayer::trim_trailing_slash().layer(app),
|
||||
|
||||
Reference in New Issue
Block a user