1. Preheat the oven to 200˚C. Grease a 20cm flan tin or quiche dish.
2. On a lightly floured board roll out pastry or use ready-rolled sheet. Use to line the dish. Trim excess pastry off and discard. Bake blind for 12 minutes.
3. To make the filling melt butter in a saucepan. Add bacon and onion. Cook until the onion is clear. Stir in flour and cook until frothy. Gradually add milk, stirring constantly until mixture boils and thickens. Remove pan from heat.
4. Add cheese to the saucepan and mix to combine. Season with salt and pepper to taste. Lightly beat eggs with a fork and stir in.
5. Remove baking blind material. Return to the oven for 1 minute to dry pastry out.
6. Remove from oven. Pour filling into the pastry base.
7. Return to oven and bake for a further 30 minutes or until filling is golden and set. Serve hot or cold.