Preheat the oven to 180ºC and prepare a glass fountain or similar. Julienne the onion and the washed pepper into strips, discarding the seeds and internal filaments. Laminate the garlic, reserving them separately.
Combine the vegetables in the dish, lightly salt, add the bay leaf and a generous splash of olive oil. Mix well and bake 10 minutes; remove and continue baking for about 8-10 minutes more, until the onion is very tender.
Meanwhile, prepare the fish drying it with kitchen paper and letting it cool down a bit. Place over the vegetables, adding another splash of oil on top and, if we have it, a little white wine. Return to oven.
Prepare a refried garlic while the fish is cooking. Heat a fund of oil in a small frying pan and cook the laminated cloves with the cayenne peppers at a low temperature, taking care not to burn them. They should be golden and crispy.
When the cod is ready, after about 15-20 minutesDepending on the thickness, pour the contents of the pan over the fish and serve immediately.