Commit Graph
898 Commits
Author SHA1 Message Date
Owen 0c752c9c29 Merge branch 'main' into dev 2026-09-21 15:21:12 -04:00
Owen Schwartz 3392120855 Merge pull request #3172 from Gulianrdgd/feature-response-headers
Feature response headers
2026-09-21 15:16:24 -04:00
Owen Schwartz 7e188ffae6 Merge pull request #3738 from breken-ai/fix/path-rule-percent-encoding
▚▚ fix(rules): decode percent-encoded PATH rule patterns before matching
2026-09-21 13:55:25 -04:00
Blacks-Army 8e2f9ea5ef Add HTTP method matching to resource rules
Resolves #1408.

A rule with match "METHOD" carries a comma-separated list of HTTP
methods in its value, e.g. "POST,PUT", and applies when the request
method is in that list. This makes it possible to leave GET public
while sending POST and PUT to auth, which rules could not express
before because both share the same path.

No new columns: the methods live in the existing rule value, so this
needs no migration and every existing rule keeps working unchanged.

The UI offers the ten registered methods. Blueprints and the API
accept any method token, so extension methods such as the WebDAV verbs
can be targeted too, and the UI preserves them when a rule set that
way is edited later.
2026-09-19 20:00:01 +02:00
Tyagiquamar b74ded3a9c fix(sqlite): tag per-migration database backups with version and prevent collisions 2026-09-18 21:31:00 +05:30
Hayyan Hajwani 9298ec7cdb fix(setup): correct month index and zero-pad database backup file names
Backup names were built inline from Date#getMonth, which is zero-indexed, so a
backup taken on 12 September 2026 was written as db_2026-8-12_20-35-56.sqlite.
No field was zero-padded either, giving names like db_2026-8-12_20-36-2.sqlite.

Extract formatBackupTimestamp into server/lib and use it from both places that
built the string: the backupDb helper in migrationsSqlite.ts and the inline copy
in the 1.0.0-beta9 setup script. Padding every field also makes the names sort
lexicographically in the order the backups were taken.

Adds tests covering both reported names, single-digit padding and sort order.
Reverting the helper to the old formula fails them with the exact name from the
report.
2026-09-16 13:46:57 +05:30
Owen 324f3e50ff Add license tiers 2026-09-15 16:25:53 -04:00
Owen c6c12f1dcb Support _FILE env vars
Closes https://github.com/fosrl/docs-v2/issues/141
2026-09-15 10:56:39 -04:00
Owen c11bbe670f Remove optional() where unneeded for zod 4 2026-09-15 10:23:37 -04:00
Owen 143b4cf757 Atomically write files to avoid races with traefik 2026-09-15 10:04:00 -04:00
Owen 56e758a656 Resolve oss build issue 2026-09-14 18:05:30 -04:00
miloschwartz 68821514a0 replace node cache in dns server 2026-09-14 17:41:41 -04:00
miloschwartz 8f1344a665 bump version and add 1.23 migrations 2026-09-14 17:18:31 -04:00
Owen 350f8c012a Pull in static domains to the traefik config again 2026-09-14 16:48:10 -04:00
Owen 8a97ed5200 Move domain information to all in private 2026-09-14 16:48:10 -04:00
Owen e66f7fe71b Implement exit node check-in tracking and adjust logging for connection errors 2026-09-14 16:48:10 -04:00
Owen ad343a7453 Wire up to start 2026-09-14 16:48:10 -04:00
Owen 7e4d38548f Add certificate generation 2026-09-14 16:48:09 -04:00
Owen 3421441635 Add cert_mode to know when to gen or pull certs 2026-09-14 16:48:09 -04:00
Owen 073bfb32e9 Adjust lic headers 2026-09-14 16:48:09 -04:00
miloschwartz aed325f273 switch to lru in memory cache and dont cache failed sessions 2026-09-14 16:48:07 -04:00
Owen ba2eb87f20 Widen subnet 2026-09-14 16:48:07 -04:00
Owen c0ea32863c Quiet up error logs 2026-09-14 16:48:07 -04:00
breken 64ae230d23 fix(rules): decode percent-encoded PATH rule patterns before matching
isPathAllowed decodes the incoming request path (and Badger already sends
Go's decoded req.URL.Path), but compared it against the rule pattern as raw
text. isValidUrlGlobPattern rejects raw spaces and non-ASCII and only accepts
them percent-encoded, so a PATH rule such as `/my%20docs/*` or `/caf%C3%A9`
was stored as `my%20docs` / `caf%C3%A9` and compared against `my docs` /
`café`, and could therefore never match any request.

Run the pattern through the same decodeAndResolvePath normalisation as the
request path so both sides are compared in decoded form.

Claude-Session: https://claude.ai/code/session_0134ujLF81GyXsCByibLcYsz
2026-09-13 19:00:59 -07:00
Owen 9d19195089 Configurable tab title and disable flag for keys 2026-09-04 09:20:20 -04:00
Owen 1bc5fbbf0f Always pull all of the users for the blueprints 2026-09-03 12:02:41 -04:00
Owen be0dd65557 Update imports 2026-09-03 11:35:28 -04:00
Owen e0937a3afa Add validation for health check hostname
Fixes #3677
2026-09-02 10:42:59 -04:00
miloschwartz 2f013335f9 make user lookup deterministic in blueprints by sorting 2026-09-01 15:36:39 -04:00
Julian van der HorstandClaude Opus 5 6ad09adefa Merge upstream/dev into feature-response-headers
Resolve conflicts against upstream's refactors:

- server/db/sqlite/schema/schema.ts: adopt upstream's reindented
  sqliteTable(name, cols, indexes) form for sites/resources, re-applying
  the headers -> requestHeaders/responseHeaders split. Kept in sync with
  the Postgres schema.
- server/lib/traefik/headersMiddleware.ts: extend upstream's extracted
  buildCustomHeadersMiddleware helper to take requestHeaders and
  responseHeaders and emit both customRequestHeaders and
  customResponseHeaders.
- server/lib/traefik/getTraefikConfig.ts and
  server/private/lib/traefik/getTraefikConfig.ts: keep upstream's helper
  extraction and appendPathMatch refactor, dropping the superseded inline
  blocks.

Also carry the feature forward onto code that moved upstream:

- The resource settings UI moved from resources/proxy/[niceId]/proxy to
  resources/public/[niceId]/http, which dropped this branch's changes in
  the previous merge. Re-add the request/response header inputs there and
  rename the vestigial headers field on the tcp page.
- messages/da-DK.json is new upstream and still had the old customHeaders
  key; rename it in line with the other locales.

Per the contributing docs, versioned migrations are intentionally omitted
so maintainers can write them at release time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 13:40:49 +02:00
miloschwartz dd0a5a359a check for namespace domain before blocking org check 2026-08-31 10:59:50 -04:00
Alejandro Argueta 7cda28d685 Update RuleSchema to allow COUNTRY_IS_NOT rules to be created via blueprints as well. 2026-08-27 14:18:48 -07:00
Owen 60bc74c4df Add AI provider and usage metrics to telemetry data collection 2026-08-27 16:54:04 -04:00
Owen a02d16fd58 Handle compression of ai session logs 2026-08-26 11:28:14 -04:00
Owen e57826d6e0 Session logs and usage logs should use seconds not ms 2026-08-26 10:50:16 -04:00
miloschwartz 906099d1e1 fix org domain access check so unmapped domains are rejected 2026-08-26 09:55:40 -04:00
Owen 23764feb4f Move the messaging out of the transaction 2026-08-25 09:27:02 -04:00
Owen 9b0e049a21 Scope exit node creation to orgs 2026-08-24 10:44:54 -04:00
Owen 442cefda84 Dont allow clients to connect to remote nodes quite yet 2026-08-21 12:25:14 -04:00
Owen 2e87927b83 Remove unused use_subdomain 2026-08-21 10:21:21 -04:00
Owen e65a79cc48 Rename to v1_models and use with openai as well 2026-08-20 16:01:07 -04:00
Owen 365a905e69 Add more data to the models catalog list 2026-08-20 15:17:48 -04:00
Owen bafbf6e096 Add anthropic_models capability 2026-08-20 14:28:19 -04:00
Owen c1caa30cb9 Move session logs to private 2026-08-19 17:25:32 -04:00
Owen 114592add8 Show a warning if the logs are disabled to reduce confusion 2026-08-19 16:16:05 -04:00
Owen ef051c2f8c Dont count usage when the response was not successful 2026-08-19 15:59:01 -04:00
Owen 437ec50019 Update the usage records to use logs db 2026-08-19 12:03:30 -04:00
miloschwartz bdd7f40688 batch identity key emails 2026-08-18 16:00:07 -04:00
Owen 7a61b182e0 Deduplicate inference resources by fullDomain to prevent duplicate routers 2026-08-17 17:13:22 -04:00
Owen 91b697b80b Track public inference domains to avoid duplicate routers for siteResource aliases 2026-08-17 17:06:37 -04:00