Roda 3.86.0 Released #369
jeremyevans
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Roda 3.86.0 has been released!
New Features
A conditional_sessions plugin has been added. This allows you to
only support sessions for a subset of the application's requests.
You pass a block when loading the plugin, and sessions are only
supported if the block returns truthy. The block is evaluated
in request scope.
As an example, if you do not want to support sessions for request
paths starting with /static, you could use:
With this example, if the request path starts with /static:
session
,session_created_at
, andsession_updated_at
all raise an exception.persist_session
and route scopeclear_session
methods do nothing and return nil.
Options passed when loading the plugin are passed to the sessions
plugin.
In the content_security_policy plugin, you can now call
response.skip_content_security_policy! to skip the setting of the
response header.
In the permissions_policy plugin, you can now call
response.skip_permissions_policy! to skip the setting of the
response header.
Other Improvements
plugins, Roda.freeze now works correctly if the Roda class is
already frozen.
Thanks,
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions