function

WithHandlerOptions

Configure the generated HTTP handler used by Execute.

Source ridu.go:266

@param options
HTTP security, limits, admin assets, observers, readiness, and worker settings.
@returns
An option to pass directly to ridu.Execute.

Generated projects use this option to attach the compiled admin assets and environment-derived HTTP policy. Passing it replaces the complete HandlerOptions value; combine settings in one value rather than scattering repeated WithHandlerOptions calls.

Example

go
ridu.WithHandlerOptions(ridu.HandlerOptions{
  AdminAssets:   adminassets.FS(),
  AllowedHosts:  []string{"cms.example.com"},
  SecureCookies: true,
})

Related types

  • HandlerOptions

    HTTP security, size bounds, observers, and trusted-proxy policy.

  • ExecuteOption

    One opaque runtime option accepted by Execute.