← all posts

Blazor Server events not triggering when hosted behind Cloudflare

Gordon Beeming
Gordon Beeming
On this page2 sections β–Ύ

#Symptoms

  • You are using Blazor Server
  • Hosting your application behind Cloudflare proxied traffic
  • No events are triggering in your blazor app

#Solution

The solution is luckily quite simple (once you know πŸ˜…)

From the Cloudflare dashboard select your domain
From the Cloudflare dashboard select your domain
Navigate to Speed | Optimization | Content Optimization | Auto Minify and untick HTML
Navigate to Speed | Optimization | Content Optimization | Auto Minify and untick HTML

Once HTML is switched off for minification, everything should work as expected.

Credit: Brendan Sluke on the StackOverflow post c# - Blazor onclick event not triggered - Stack Overflow

Gordon Beeming
Gordon Beeming

Father β€’ Husband β€’ Triathlete β€’ SSW Solution Architect

Related posts