Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ name = "encrypted_upload_test"
path = "examples/encrypted_upload_test.rs"

[workspace.package]
version = "0.6.15"
version = "0.6.16"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/functionland/fula-api"
Expand Down
18 changes: 15 additions & 3 deletions crates/fula-cli/src/handlers/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,9 +863,21 @@ pub async fn get_object(
response = response.header("Content-Type", ct);
}

if let Some(ref cc) = metadata.cache_control {
response = response.header("Cache-Control", cc);
}
// Default GET responses to `no-cache` so a browser HTTP cache (the web app
// runs on `fetch`, which obeys it; native reqwest has no such cache) ALWAYS
// revalidates via the ETag instead of serving a heuristically-cached copy.
// This is what fixes the web app showing a STALE folder/bucket listing after
// an upload: the forest index lives at an encrypted key the gateway can't
// single out, but `no-cache` makes the browser re-check EVERY object —
// - the index: its content (hence ETag) changes on each write, so the
// conditional GET misses and returns 200 with the FRESH index;
// - unchanged file content: ETag matches, so the conditional GET returns
// 304 (handled at the If-None-Match block above) and the browser serves
// the cached body with NO re-download.
// Net: listings stay fresh while downloads stay cached. A stored per-object
// cache_control still wins (e.g. an explicit `immutable` hint set on write).
let cache_control = metadata.cache_control.as_deref().unwrap_or("no-cache");
response = response.header("Cache-Control", cache_control);

if let Some(ref cd) = metadata.content_disposition {
response = response.header("Content-Disposition", cd);
Expand Down
2 changes: 1 addition & 1 deletion crates/fula-flutter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Flutter bindings for Fula decentralized storage - works on Androi
# to parse `*.workspace = true` keys in its own manifest scan. Keep
# these in sync with `[workspace.package]` in the root Cargo.toml.
# (Same workaround as crates/fula-js.)
version = "0.6.15"
version = "0.6.16"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/functionland/fula-api"
Expand Down
2 changes: 1 addition & 1 deletion crates/fula-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "JavaScript/TypeScript SDK for Fula decentralized storage - WASM b
# Hard-coded (not workspace-inherited) because wasm-pack <= 0.13 fails
# to parse `*.workspace = true` keys in its own manifest scan. Keep
# these in sync with `[workspace.package]` in the root Cargo.toml.
version = "0.6.15"
version = "0.6.16"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/functionland/fula-api"
Expand Down
2 changes: 1 addition & 1 deletion packages/fula_client/ios/fula_client.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Pod::Spec.new do |s|
s.name = 'fula_client'
s.version = '0.6.15'
s.version = '0.6.16'
s.summary = 'Flutter SDK for Fula decentralized storage'
s.description = <<-DESC
A Flutter plugin providing client-side encryption, metadata privacy,
Expand Down
2 changes: 1 addition & 1 deletion packages/fula_client/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fula_client
description: Flutter SDK for Fula decentralized storage with client-side encryption, metadata privacy, and secure sharing.
version: 0.6.15
version: 0.6.16
homepage: https://fx.land
repository: https://github.com/functionland/fula-api
issue_tracker: https://github.com/functionland/fula-api/issues
Expand Down
Loading