Skip to content

security: register SecureHeaders pipe in routes template - #27

Open
renich wants to merge 2 commits into
amberframework:mainfrom
renich:security/register-secure-headers-pipe
Open

renich wants to merge 2 commits into
amberframework:mainfrom
renich:security/register-secure-headers-pipe

Conversation

@renich

@renich renich commented Jun 15, 2026

Copy link
Copy Markdown

Enables the SecureHeaders pipe in the generated application route template (routes.cr.ecr) by default in the :web pipeline.

This completes the registration of the SecureHeaders pipe (which was added in the core framework in amberframework/amber#1390) so that newly generated apps will benefit from baseline security headers (XSS, Frame Options, nosniff, HSTS) out of the box.

Co-developed-by: Gemini AI renich+gemini@woralelandia.com
Signed-off-by: Rénich Bon Ćirić renich@woralelandia.com

Registers Amber::Pipe::SecureHeaders.new in the generated web pipeline
before Amber::Pipe::Error. Placing SecureHeaders before Error ensures
that unrouted (404) and error responses retain baseline security headers
(such as X-Content-Type-Options: nosniff).

Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>
Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
@renich
renich force-pushed the security/register-secure-headers-pipe branch from f64826f to bb0a0f7 Compare September 16, 2026 03:36
…lines

Plug Amber::Pipe::SecureHeaders before Error pipe in active NewCommand
generator heredoc as well as legacy routes.cr.ecr template. Include
regression spec asserting presence in generated routes.

Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>
Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant