Skip to content

Commit 531dcca

Browse files
committed
docs: update README to clarify route-level host middleware configuration
1 parent 30ccea6 commit 531dcca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ The bridge between your plugin and the Paca host. Available via `Init(ctx)`:
8080
- `ctx.Route(method, path, handler)` — register an HTTP endpoint
8181
- `ctx.On(event, handler)` — subscribe to a core platform event
8282

83+
Route-level host middleware (for example `authn`, `requireFreshPassword`,
84+
`requirePermissions`) is configured in `plugin.json` under
85+
`backend.routes[].middlewares`.
86+
8387
### `DB`
8488
Typed SQL execution. The host enforces row-level scoping; you can only see data for the project where the plugin is enabled.
8589
- `db.Query(sql, args...)` — execute a read query; returns `[]map[string]any`

0 commit comments

Comments
 (0)