Preheat the oven to 375°F (190°C) to ensure it is hot and ready for roasting.
Prepare the onion by trimming the top and bottom so it sits flat, then use a spoon or melon baller to scoop a well about one-third of the way into the top center.
Place the onion on a large square of aluminum foil and push the butter into the hollowed-out center.
Whisk together the olive oil, Cajun seasoning, and optional spices in a small bowl, then pour this mixture over the butter and down the sides of the onion.
Wrap the foil tightly around the onion to create a sealed pouch that will trap steam, then place it in a baking dish or skillet.
Bake in the center of the oven for one hour until the onion is soft and fork-tender throughout.
Open the foil carefully to avoid steam burns and, if desired, place under the broiler for a few minutes to achieve golden-brown edges.
Transfer the onion to a plate, pour the remaining buttery juices from the foil over the top, and garnish with fresh parsley.