Compare commits

...

4 Commits

Author SHA1 Message Date
Lennart
b2f5d5486c version 0.9.5 2025-09-17 10:06:07 +02:00
Lennart
db674d5895 Allow setting HTTP payload limit and set default to 4MB
#124
2025-09-17 10:06:07 +02:00
Lennart K
bc98d1be42 document thing to watch out for with Kubernetes #122 2025-09-16 15:34:31 +02:00
Lennart
4bb8cae9ea docs: Fix typo for env var configuration 2025-09-14 18:55:33 +02:00
8 changed files with 31 additions and 14 deletions

22
Cargo.lock generated
View File

@@ -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",

View File

@@ -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/"

View File

@@ -9,7 +9,7 @@ docker run \
-p 4000:4000 \
-v YOUR_DATA_DIR:/var/lib/rustical/ \
-v OPTIONAL_YOUR_CONFIG_TOML:/etc/rustical/config.toml \ # (1)!
-e RUSTICAL__CONFIG_OPTION="asd" \ # (2)!
-e RUSTICAL_CONFIG_OPTION="asd" \ # (2)!
ghcr.io/lennart-k/rustical
```

View File

@@ -0,0 +1,11 @@
# Notes
## Kubernetes setup
If you setup RustiCal with Kubernetes and call the deployment `rustical`
Kubernetes will by default expose some environment variables starting with `RUSTICAL_`
that will be rejected by RustiCal.
So for now the solutions are either not calling the deployment `rustical` or setting
`enableServiceLinks: false`, see <https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service>.
For the corresponding issue see <https://github.com/lennart-k/rustical/issues/122>

View File

@@ -68,6 +68,7 @@ nav:
- Installation:
- installation/index.md
- Configuration: installation/configuration.md
- Notes: installation/notes.md
- Client Setup: setup/client.md
- OpenID Connect: setup/oidc.md
- Developers:

View File

@@ -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))
}

View File

@@ -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,
}
}
}

View File

@@ -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),