Preheat oven to 475 degrees F.
Place the flour in a small bowl.
In another small bowl, combine the buttermilk and egg with a fork.
In a larger bowl, combine the cayenne and onion powder.
For each onion ring: Coat with the flour and shake off excess. Dip in the buttermilk mixture and shake off excess. Finally, dip in the panko mixture and shake off excess.
Place the coated onion rings on a baking sheet and coat with cooking spray.
Bake in oven until browned and crispy. About 20 minutes.
For the Garlic Ranch:
Combine all ingredients and mix well.