Container Networking & Routing (W3P)

A critical learning from the w3p-server project involved the interaction between Traefik and NestJS routing.

🛠️ The Issue: Prefix Stripping

Traefik was initially configured with stripprefix middleware. While this is common, it caused 404 errors because the NestJS backend applications were already configured with internal global prefixes (e.g., authentication-service/v1/...).

The Fix

  • Removed all stripprefix labels from docker-compose.yml.
  • Ensured Traefik passed the full path to the backend.
  • Verified stability across presale, listener, and partner stacks.

🚀 Best Practice

When using NestJS with a reverse proxy, match the internal app prefix with the proxy route to avoid routing mismatches and simplify debugging.


Source: Session Log 178e9c5f