Repository navigation
Expose Rack Server Pages middleware configuration - #183
Merged
dblock merged 1 commit intoOct 25, 2026
Merged
Conversation
dblock
force-pushed
the
feature/server-pages-configuration
branch
from
October 25, 2026 19:41
7693906 to
acf1108
Compare
Danger ReportNo issues found. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
feature/server-pages-configuration
branch
from
October 25, 2026 19:44
acf1108 to
c2f478b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bump the next version to 2.3.0 for this new configuration feature.
Add a
config.server_pagesblock that receives the underlyingRack::ServerPages::Configafter the framework appliesview_paths. Bots can configure template/static cache policies and other supported page options centrally in an initializer rather than assigning headers inside templates.The callback is applied when the middleware stack is built, not per request. A later registration replaces the earlier callback;
Config.reset!clears it; configuration errors propagate. With no callback, existing view-path behavior and the installed library’s defaults remain unchanged. No dependency minimum, global cache policy, release, or bot deployment is introduced.Document startup timing, rebuilding cached middleware, library-version requirements for newer options, and an example setting
cache_controlandstatic_cache_control. This enables a follow-up to the template-level cache headers in slack-ruby/slack-shellbot#88 once a framework release is available.Validation
Targeted middleware specs pass with both Mongoid 9.1 and Active Record 8.1 on Ruby 4.0.9 / Grape 4: 7 examples, 0 failures each. Focused lint passes. Regressions cover unchanged defaults, configuration ordering and one-time application, view-path overrides, callback replacement/reset, and explicit errors.
Authored by Copilot (AI), on behalf of @dblock.