To make this recipe gluten-free, substitute the all-purpose flour with a high-quality gluten-free flour blend that contains xanthan gum for structure. Ensure the Gruyere and Cheddar cheeses are certified gluten-free, as some pre-shredded varieties may contain additives.