The British government has authorised strikes on Iranian missile sites that are attacking ships in the Strait of Hormuz.