snix/snix
Marijan Petričević 6b48bcc1bf feat(snix/castore-http): initial implementation
The castore-http crate provides both a binary and a library interface to
serve a single castore root node over HTTP.

The library function `get_root_node_contents` will return a
`axum::Response` for a requested path in the castore root node
depending on the requested paths type.

If the requested path in the root node is a directory, we return:
- a index file if there is a file matching one of the configurable
  `index_names`
- a directory listing, if no `index_names` were configured and
  `auto_index` was enabled
- the FORBIDDEN status code if no `index_names` were set nor
  `auto_index` was enabled

If the requested path in the root node is a file,
we return the file.

If the requested path in the root node is a symlink,
we figure out wether the target exists and return a REDIRECT.

If the requested path doesn't exist in the root node,
we respond with NOT_FOUND

The binary wraps this functionality and allows one to specify the
desired root node by providing its base-64 encoded representation as
well as the other configuration parameters affecting the behavior of
`get_root_node_contents`.

Change-Id: I737482299f788ec0244c54b52042f9eb655a05c2
Reviewed-on: https://cl.snix.dev/c/snix/+/30245
Autosubmit: Marijan Petričević <marijan.petricevic94@gmail.com>
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
2025-04-14 14:43:25 +00:00
..
.vscode chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
boot chore(boot): rename figlet-generated text from "Tvix" to "Snix" 2025-04-04 08:32:28 +00:00
build feat(snix-build/oci): Use user's subordinate ids in oci builds. 2025-04-10 02:56:02 +00:00
build-go chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
castore feat(cli): add snix-castore utility 2025-04-10 13:09:50 +00:00
castore-go refactor(snix/castore): rename proto node to entry 2025-04-04 23:19:07 +00:00
castore-http feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00
cli fix(cli): use logging infra instead of print(ln), do not mess up progress bars 2025-03-21 17:45:39 +00:00
docs docs(snix/docs): drop some parts of architecture 2025-04-04 23:52:13 +00:00
eval refactor(eval): add keys_sorted() to NixAttrs 2025-04-11 11:45:42 +00:00
glue feat(snix-glue): Propagate build inputs correctly. 2025-04-11 21:48:50 +00:00
nar-bridge refactor(snix/castore): rename proto node to entry 2025-04-04 23:19:07 +00:00
nix-compat docs: fix broken references in rust docs 2025-04-09 21:08:52 +00:00
nix-compat-derive chore(third_party/sources): Update 2025-03-18 23:23:16 +00:00
nix-compat-derive-tests chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
nix-daemon fix(treewide): remove trailing whitespace 2025-03-22 17:29:59 +00:00
nix-lang-test-suite chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
serde chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
store docs: fix broken references in rust docs 2025-04-09 21:08:52 +00:00
store-go chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
tracing chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
verify-lang-tests chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
.gitignore chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
Cargo.lock feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00
Cargo.nix feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00
Cargo.toml feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00
clippy.toml chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
crate-hashes.json fix(treewide): add missing final newlines 2025-03-21 13:33:32 +00:00
default.nix feat(snix/rust-docs): fail build if there's broken references 2025-04-12 15:17:41 +00:00
LICENSE chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
logo.webp chore(snix): s/tvix/snix/ 2025-03-17 17:15:08 +00:00
shell.nix fix(tvix/shell): simplify darwin-specific overrides 2025-03-18 23:07:01 +00:00
utils.nix feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00