Skip to content

Codespaces: autostart, client preview, and SSR proxy-header fix - #14

Merged
sis0k0 merged 2 commits into
mainfrom
fix-codespaces
Jul 24, 2026
Merged

Codespaces: autostart, client preview, and SSR proxy-header fix#14
sis0k0 merged 2 commits into
mainfrom
fix-codespaces

Conversation

@sis0k0

@sis0k0 sis0k0 commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Makes the project run out-of-the-box in GitHub Codespaces and fixes an SSR warning behind the Codespaces proxy.

SSR proxy headers

  • Pass { trustProxyHeaders: true } to AngularNodeAppEngine in client/server.ts. Codespaces terminates TLS at a trusted reverse proxy and forwards the original request via X-Forwarded-* headers; without this, Angular v22 ignores them and logs Received "x-forwarded-scheme" header but "trustProxyHeaders" was not set up to allow it.

Devcontainer

  • Auto-open codespaces.md when the project opens.
  • Open a preview for the Angular Client on port 4200 (onAutoForward: openPreview).
  • Start the server and client on attach (postAttachCommand).

Welcome guide

  • Add codespaces.md — a getting-started doc telling developers the app is already running (no install/start steps), with the forwarded ports, how to use the app, project layout, and optional seed/test commands.

Notes

  • The tutorial (mean-stack-tutorial.md) is intentionally not included.
  • The devcontainer's postAttachCommand references .devcontainer/portSetup.sh, which is not present in the repo — worth adding or removing separately.

sis0k0 added 2 commits July 24, 2026 16:08
- Trust X-Forwarded-* headers in the Angular SSR server so it
  reconstructs the correct request URL behind the Codespaces proxy
  (fixes the 'trustProxyHeaders was not set up' warning).
- Devcontainer: auto-open codespaces.md, open a preview for the
  Angular client (port 4200), and start the server/client on attach.
- Add codespaces.md welcome guide shown when the project opens.
- Make forwarded ports (4200, 27017, 5300) public via the gh CLI.
- Add a shebang and executable bit so postAttachCommand can run it directly.
@sis0k0
sis0k0 merged commit 1fc3efe into main Jul 24, 2026
3 checks passed
@sis0k0
sis0k0 deleted the fix-codespaces branch July 24, 2026 13:15
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