During which war did the government first allow journalists to travel with a military unit?

The first war in which the government allowed journalists to travel with a military unit was the Crimean War (1853-1856).