Skip to content

Plan for CDN hosting static files post Blazor migration #402

@bruno-garcia

Description

@bruno-garcia

Context

As part of the Blazor migration, we vendored CDN dependencies (Bulma, Font Awesome, Chart.js, chartjs-adapter-date-fns) into wwwroot/lib/ to eliminate external requests. Currently these are served from the same origin as the app.

Goal

Serve static assets from a dedicated CDN domain to avoid the browser's 6 concurrent connections per domain limit:

  • Production: cdn.nugettrends.com
  • Staging: staging.cdn.nugettrends.com
  • Development: empty (serve locally)

Implementation ideas

  • Add a CdnBaseUrl setting to appsettings.{Environment}.json
  • Read it in App.razor via IConfiguration and prepend to lib/ asset paths
  • Update ExternalDependencyTests to allow requests to the configured CDN host
  • Set up CDN infrastructure (e.g. Azure CDN, Cloudflare) pointing to the app's static files

Related

Vendored assets committed in the Blazor frontend branch (wwwroot/lib/).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions