Public Routes & Delivery
Everything outside /api/ is the public side: directory indexes, direct file URLs, signed links and a few support routes. It never needs a key and accepts no request bodies — the one exception being the optional web sign-in form. This page lists every route and the exact HTTP behavior.
Routes
| Route | Behavior |
|---|---|
GET / | Root index (unless disabled by VELA_ROOT_INDEX=off or a root policy) |
GET /{dir}/ | Directory index; 404 if it has no public files below or its index is disabled |
GET /{dir}/?format=json | The same index data as JSON |
GET /{path} | Public or unlisted object → content. Private, missing, expired or trashed → 404. A directory with an enabled index → 301 to /{path}/ |
GET /s/{linkID}/{filename}?exp=…&sig=… | Signed link (see verification) |
GET /_vela/assets/… | Theme assets (CSS, icons, fonts) |
GET /robots.txt | Generated from VELA_ROBOTS |
GET /favicon.ico | From the theme |
GET /healthz | Health probe |
GET /_vela/login?next=… | Sign-in form — only with VELA_WEB_AUTH=on, otherwise 404 |
POST /_vela/login?next=… | Same-origin sign-in with a key form field: 303 to next with the session cookie, 401 for any invalid key, 429 after five failures a minute |
POST /_vela/logout?next=… | Same-origin sign-out: deletes the session, expires the cookie, 303 to next |
HEAD on all of the above | Same headers, no body |
| Any other method | 405 |
Because these routes are reserved, no object path may start with api, s, _vela, _blobs, healthz, robots.txt or favicon.ico.
Index pages
- Only public, unexpired files are shown. Unlisted and private files never appear and never make a directory visible.
- Directories first, then files, in natural case-insensitive order.
- Headers:
Cache-Control: public, max-age=60, a strictContent-Security-Policy, andX-Robots-Tag: noindex, nofollowunder noindex directories. - 404 and 410 pages are rendered by the theme's
error.html. - With web sign-in, a signed-in visitor also sees the files and directories their key can reach, marked with visibility indicators; those pages are
private, no-store. See What a signed-in visitor sees.
$ curl -s 'https://store.example.com/docs/?format=json' | jq '.files[].name'
"welcome.txt"
The JSON contains exactly what the HTML shows — for anonymous visitors, never non-public objects. Its fields are described in Theming.
Symlinks appear as ordinary files, with their file's size and type and their own title, tags and date, when their effective visibility is public and they are not broken. They count towards directory counts and dates by the same rule, and the path of their file is never shown.
robots.txt
User-agent: *
Disallow: /
User-agent: *
Allow: /
Disallow: /s/
Disallow: /api/
Hidden directories are never listed in robots.txt — that would reveal them. Use noindex policies for crawler hints on specific sections.
Content responses
Direct URLs, signed links and API downloads share one delivery path; only the policy headers differ.
| Header | Value |
|---|---|
Content-Type | The object's content type |
Content-Disposition | inline or attachment with filename and RFC 6266 filename*=UTF-8''… |
ETag | "sha256:<hex>" — the only validator |
Accept-Ranges | bytes |
X-Content-Type-Options | nosniff, always |
Cache-Control | public, max-age=300 for public/unlisted URLs; private, no-store for signed links and API downloads |
X-Robots-Tag | noindex, nofollow for unlisted files, signed links, API downloads and files under noindex directories |
Referrer-Policy | no-referrer for signed links and API downloads; with web sign-in, same-origin on HTML pages and sandboxed uploads |
Vary | Cookie on index, direct-URL and error responses — only with web sign-in |
Content-Security-Policy | sandbox … for uploads other than raster images, audio, video, PDF and plain text — only with web sign-in |
Validators and conditional requests
The SHA-256 ETag identifies content exactly, so If-None-Match returns 304 only when the bytes are identical. Last-Modified is intentionally not sent and If-Modified-Since is ignored: one-second timestamps would falsely validate content replaced within the same second. HEAD and matching conditional requests are answered from metadata without reading content.
$ curl -sI https://store.example.com/docs/welcome.txt \
-H 'If-None-Match: "sha256:aad4b3e2d8394393e8b98ca12dbe8d3aa72254c5dd030fc63cf2ee0da0743dbc"' | head -1
HTTP/1.1 304 Not Modified
Ranges
- Single ranges return
206 Partial ContentwithContent-Range.If-Rangeis compared with the SHA-256 ETag. - Invalid or unsatisfiable ranges return
416withContent-Range: bytes */<size>,Cache-Control: no-storeand no ETag, so a cache never stores the error in place of the file. - In R2 proxy mode, multi-range requests fall back to a full
200.
curl -s -r 0-99 https://store.example.com/isos/big.iso -o first-100-bytes.bin
HTML and SVG uploads
Uploaded HTML and SVG are served with their real types, so they render in the browser. Without web sign-in the origin carries no cookies or sessions, and the API authenticates only with headers, so this cannot be used for CSRF against Vela. With web sign-in, such uploads are served in a CSP sandbox, away from the session cookie. Give Vela its own domain if other applications set parent-domain cookies; see Security.
Symlinks
A symlink is delivered from its file's content: Content-Type, size and ETag are the file's, so overwriting the file changes the ETag of every symlink to it. Content-Disposition carries the symlink's own name and disposition, Cache-Control and the CSP sandbox follow the effective visibility and the file's type, and X-Robots-Tag follows the symlink's directory. A symlink whose effective visibility is private, that is broken, or whose file or own entry has expired answers 404. In accel mode nginx receives an X-Accel-Redirect to the file's blob; nothing in the proxy changes.
Delivery modes
Authorization is identical in every mode: Go decides. The modes differ only in who moves the bytes.
| Mode | Configuration | Bytes delivered by | Requirement |
|---|---|---|---|
| FS direct (default) | VELA_STORAGE=fs, VELA_ACCEL_PREFIX= | velad, from disk | Any proxy, or none |
| FS accel | VELA_STORAGE=fs, VELA_ACCEL_PREFIX=/_blobs/ | nginx, via X-Accel-Redirect | Matching internal locations; nginx can read the blob directory |
| R2 proxy | VELA_STORAGE=r2, VELA_R2_DELIVERY=proxy | velad, streamed from the bucket | Proxy buffering and temp files disabled |
| R2 redirect | VELA_STORAGE=r2, VELA_R2_DELIVERY=redirect | The bucket, via a short-lived presigned URL | Clients can reach the S3 origin |
How accel works
GET /docs/big.iso HTTP/1.1 (client → nginx → velad)
HTTP/1.1 200 OK (velad → nginx: empty body)
X-Accel-Redirect: /_blobs/r7/c4/01m4tscd50ry5wfktp4mx4r7c4
Content-Type: application/x-iso9660-image
Content-Disposition: inline; filename="big.iso"; filename*=UTF-8''big.iso
X-Vela-ETag: "sha256:…"
X-Vela-Cache-Control: public, max-age=300
With web sign-in, Vary and the upload sandbox travel the same way as X-Vela-Vary and X-Vela-Content-Security-Policy, because nginx drops Vary from an X-Accel-Redirect response.
nginx performs an internal redirect to /_blobs/…, serves the file with sendfile, and re-emits the X-Vela-* values as the real headers, exactly once. Internal headers never reach the client, and /_blobs/ is unreachable from outside. Signed links use /_blobs/s/… so error logging can be disabled for them. Details in nginx.
How R2 redirect works
velad answers 302 Found with Location set to a presigned bucket URL that carries the response content type, disposition and cache policy. The redirect itself is private, no-store with no-referrer. Grants are capped at the object's or link's expiry and at VELA_R2_PRESIGN_TTL; near expiry and for conditional requests Vela proxies instead. See R2 redirect mode.
Caching guidance
- Public and unlisted files: shared caches may keep them five minutes, so visibility changes and overwrites can take that long to reach everyone.
- Index pages: one minute.
- Versioned theme assets (
?v=…): up to a year. - Signed links, API responses and errors: never cached.
- Anything served to a signed-in browser: never cached. Behind a CDN that ignores
Vary: Cookie, bypass the cache for the__Host-vela_sessioncookie.