You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds generic support for serving the Roborev browser application below a configured URL path prefix.
The prefix is applied consistently across HTTP routing, redirects, runtime metadata, CLI deep links, embedded assets, API and event-stream requests, and client-side history. Internal application routes remain distinct from already-prefixed external API base URLs, including when a route overlaps the configured prefix. Root-mounted behavior remains the default.
Remote browser access requires a dedicated origin. A base path provides routing, and cookie path scoping reduces incidental transmission, but neither isolates Roborev from other applications on the same origin.
Also adds a host-local browser token-file option, with fail-closed validation and mutual exclusion from the inline token. Base paths reject values that URL parsers could reinterpret, including percent escapes, backslashes, control characters, and surrounding whitespace. Reverse proxies can preserve the prefix while keeping the browser listener loopback-bound and streaming responses unbuffered.
Production template injection rejects missing or duplicate markers instead of silently serving root-relative URLs. The release check exercises the generated Vite output with a non-root prefix.
The full Go suite, browser suite, repository hooks, and production web build pass.
Co-authored-by: Wes McKinney <wesm@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/configuration.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -764,8 +764,10 @@ column_borders = true # Show separators between TUI columns
764
764
|`server_addr`| string | 127.0.0.1:7373 | Daemon listen address. Use `unix://` for Unix domain socket (see [Unix Domain Socket](#unix-domain-socket)) | No |
765
765
|`web.enabled`| bool | true | Serve the embedded browser application on a separate listener | No |
766
766
|`web.listen`| string | 127.0.0.1:0 | Loopback browser listener address. Port 0 selects an available ephemeral port | No |
767
-
|`web.public_origin`| string | - | Exact HTTPS origin exposed by a reverse proxy | No |
767
+
|`web.public_origin`| string | - | Exact dedicated HTTPS origin exposed by a reverse proxy | No |
768
+
|`web.base_path`| string | - | Optional canonical routing prefix, without a trailing slash; not a same-origin security boundary | No |
768
769
|`web.auth_token`| string | - | Base64url-encoded 32-byte random token exchanged for a process-local browser session | No |
770
+
|`web.auth_token_file`| string | - | Host-local file containing the browser token; mutually exclusive with `web.auth_token`| No |
769
771
|`max_workers`| int | 4 | Number of parallel review workers | No |
770
772
|`job_timeout_minutes`| int | 30 | Per-job timeout in minutes | Yes |
771
773
|`hook_timeout_seconds`| int |`3` (`30` on Windows) | Post-commit hook request timeout, in seconds. Raise it on Windows or large repos where the daemon's enqueue git calls are slow. Zero or negative values are ignored and fall back to the platform default | Yes |
@@ -838,16 +840,34 @@ Paste that command's output as `auth_token`:
838
840
enabled = true
839
841
listen = "127.0.0.1:7374"
840
842
public_origin = "https://reviews.example.com"
841
-
auth_token = "paste-the-generated-token-here"
843
+
base_path = "/reviews"
844
+
auth_token_file = "/etc/roborev/web-auth-token"
842
845
```
843
846
847
+
`public_origin` must be an exact scheme-and-authority origin with no path and
848
+
must be dedicated to Roborev-controlled content. Serve sibling applications from
849
+
separate origins. Set `base_path` separately when the proxy mounts the browser
850
+
application below a URL prefix; it must start with `/`, have no trailing slash,
851
+
query, fragment, percent escape, backslash, control character, surrounding
852
+
whitespace, or path traversal. The token file must contain exactly one
853
+
base64url-encoded 32-byte token, optionally followed by one terminal newline. It
854
+
is mutually exclusive with `auth_token` and is read when the daemon starts, so
855
+
the token bytes do not need to be stored in the configuration file.
856
+
844
857
The proxy must preserve the public `Host`, set conventional forwarding headers,
845
858
and avoid buffering `/api/stream/events` and streamed `/api/job/output`
846
859
responses. The public origin must match the browser origin exactly and must use
847
860
HTTPS for remote access. Roborev rejects non-loopback browser listener addresses
848
861
so credentials are never sent over a plaintext network hop. The CLI API remains
849
862
private on its original listener.
850
863
864
+
The browser session cookie uses `/` when `base_path` is empty and
865
+
`base_path + "/"` when a prefix is configured. That path scope reduces
866
+
incidental cookie transmission, but it is not an authorization boundary: scripts
867
+
on the same origin can still make requests below the prefix. `base_path`
868
+
provides routing only, so do not host sibling applications on the Roborev
869
+
origin.
870
+
851
871
The browser exchanges the daemon token for an HTTP-only cookie and tab-scoped
852
872
credentials. The token is entered after the public shell opens and is never
853
873
retained by the application. Sessions are process-local, so every daemon restart
0 commit comments