← All recipes
Moderne licensed

Add trustProxyHeaders to the Angular app engine

Recipe IDorg.openrewrite.angular.migration.add-trust-proxy-headersArtifact@openrewrite/recipes-angular

Adds trustProxyHeaders: ['x-forwarded-host', 'x-forwarded-proto'] to new AngularNodeAppEngine() and new AngularAppEngine(). Angular 22 stopped trusting forwarded headers by default; the option restores the previous behavior and carries a TODO to remove it when the server does not sit behind a trusted proxy.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.migration.add-trust-proxy-headers

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular