Heat the olive oil. Finely chop the onion and add to the pot. Cover and simmer for 5 minutes or until tender. While this is cooking, core the tomatoes, seed them and chop them, then add to the pot and simmer for 5 minutes.
Add the chicken broth and bring to a simmer and while this is coming to a simmer, remove the corn kernels from the ears of corn; add them to the broth and simmer for 4 minutes. Remove the soup from the heat, add the lime or lemon juice and season to taste with salt and dried red pepper flakes. Garnish with cilantro or parsley.