Preheat the oven to 180ºC and prepare a glass fountain or similar. Cut the onion into julienne strips and the washed pepper into strips, discarding the seeds and internal filaments. Laminate the garlic, reserving them separately.
Combine the vegetables in the pan, lightly salt, add the bay leaf and a generous drizzle of olive oil. Mix well and bake 10 minutes; stir 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 temper a bit. Place on the vegetables, adding another drizzle of oil on top and, if we have, a little white wine. Return to the oven.
Prepare a garlic sauce while the fish cooks. Heat a bottom of oil in a small frying pan and cook the sliced cloves with the cayenne at a low temperature, taking care that they do not burn. They should be golden brown and crisp.
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.