Is it okay to exercise and sweat with a cold and headache?

Exercise and sweating is not recommended when you have a cold. Stretching activities such as walking can be done during the course of the illness, but strenuous exercise is not recommended. As some colds may be secondary to myocarditis, strenuous exercise may lead to serious consequences such as cardiac arrhythmia and heart enlargement.
It is still recommended to drink plenty of water and rest. Take non-steroidal antipyretic analgesics for severe headaches, and if they do not relieve or last for a long time, a hospital visit to the infection unit is recommended.