Skip to content

docs: add an App Hosting deployment guide for SSR (silent CSR fallback) #3719

Closed

Description

@armando-navarro

The problem

A freshly deployed Angular SSR app on Firebase App Hosting can silently stop server-rendering and fall back to client-side rendering (CSR). The page still looks fine in a browser, but the server sends an almost-empty shell: crawlers and link previews see no content, and first paint is worse. There is no error in the deploy output or the browser, only a line in firebase functions:log.

The cause is proxy-header trust: App Hosting's proxy adds X-Forwarded-* headers that Angular's server engine does not trust by default, so it de-optimizes to CSR on every request.

How to detect it

On a deployed SSR route:

curl -s https://YOUR-SITE/ | grep ng-server-context

If the response has no ng-server-context="ssr", the server is not server-rendering.

The gap

AngularFire has no deployment guide covering this. The existing docs/universal/ content still uses the deprecated @nguniversal stack (last updated mid-2023) and never mentions @angular/ssr. New SSR users hit the fallback silently.

Proposal

Add a docs/app-hosting.md guide (linked from the README) that documents the 30-second ng-server-context check and the two-step fix (npm update @angular/core @angular/ssr plus trustProxyHeaders: true), deferring to Firebase's App Hosting troubleshooting guide as the authoritative source. This affects both public deploy paths (a connected GitHub repo and firebase deploy), which build the same way.

Version info

  • Angular: 21.x
  • @angular/fire: 20.x / 21.0.0-rc
  • firebase-tools: 15.x

Activity

  1. added
    comp: ssrServer-side rendering, hydration, @angular/ssr interop.
    Fixed!Resolved in a current release.
    type: choreMaintenance with no user-facing behavior change.
    on Jul 25, 2026
  2. added this to the 21.0.0-rc.1 milestone on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed!Resolved in a current release.comp: docsDocumentation.comp: ssrServer-side rendering, hydration, @angular/ssr interop.type: choreMaintenance with no user-facing behavior change.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions