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.
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.
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
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>