No description
Find a file
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
.gcroots feat(.envrc): gcroot third_party.sources 2022-09-15 11:27:53 +00:00
.nixery chore(3p/sources): bump to OpenSSH vulnerability hotfix 2024-07-01 17:42:30 +00:00
contrib feat(contrib/fetchroots): track git revisions 2025-04-04 16:41:32 +00:00
fun/clbot refactor(fun/clbot): drop changeShouldBeSkipped functionality 2025-03-21 16:36:29 +00:00
nix chore: Remove buildGo and supporting infrastructure 2025-03-21 09:58:25 +00:00
ops feat(ops/keycloak): configure user profile declaratively 2025-04-04 16:41:12 +00:00
snix feat(snix/castore-http): initial implementation 2025-04-14 14:43:25 +00:00
third_party fix(treewide): remove trailing whitespace 2025-03-22 17:29:59 +00:00
tools feat(depotfmt): enforce editorconfig 2025-03-22 17:29:59 +00:00
web chore: load snix shell using direnv 2025-04-09 12:03:59 +00:00
.editorconfig feat(editorconfig): add global editorconfig 2025-03-19 11:35:35 +00:00
.envrc chore: fix unreleased direnv bug 2025-04-09 22:39:01 +00:00
.git-blame-ignore-revs fix: add cl/4397 (treewide nixpkgs-fmt) to git-blame-ignore-revs 2022-02-07 18:15:09 +00:00
.gitignore chore: add .direnv to gitignore 2025-04-12 18:12:35 +00:00
.gitreview chore: Introduce .gitreview file 2024-08-31 13:05:23 +00:00
.hgignore chore(hgignore): ignore .git for hg 2020-06-14 18:23:13 +00:00
.mailmap chore(mailmap): add edef 2025-04-01 18:47:29 +00:00
.rgignore chore: Only exclude //third_party/git from ripgrep 2020-05-17 23:58:22 +01:00
buf.gen.yaml fix(treewide): add missing final newlines 2025-03-21 13:33:32 +00:00
buf.yaml chore(buf): Use nixpkgs-provided buf 2022-10-21 18:39:03 +00:00
default.nix fix(default.nix): drop usersFilter 2025-03-20 12:21:44 +00:00
LICENSE feat(LICENSE): add Snix Project 2025-03-17 12:45:09 +00:00
OWNERS chore: update OWNERS 2025-03-20 12:21:43 +00:00
README.md chore(*): drop everything that is not required for Tvix 2025-03-17 16:18:26 +00:00
RULES feat(whitby): Let sterni bear the wheel 2021-05-23 19:06:15 +00:00
rustfmt.toml feat(depotfmt): Check & format Rust code with rustfmt 2022-02-08 12:06:39 +00:00

Snix is a modern Rust re-implementation of the components of the Nix package manager.

For more information, checkout the website, hosted at snix.dev, which also is available in the web/ subdirectory of this repository.