ContentServerOptionsinterface
import { ContentServerOptions } from '@mortar-kit/core/server'
interface ContentServerOptions<User = unknown>Options for createContentServer.
Properties
content: ContentThe app's
createContent(...).auth: false | { require: any }Who may write:
auth.require(request)resolves for a signed-in editor and throws a Response otherwise (createAuthfrom@mortar-kit/auth).falseleaves writes open to anyone: only for local experiments.canWrite?: (write: ContentWrite<User>) => boolean | Promise<boolean>Which writes a signed-in editor may make, after
authlet them in: false refuses the write with a 403 ("Not allowed"), which the admin shows. Default: every editor may write everything. A collection's owncanWrite(defineCollection) is checked after this one, and both must allow.