ride with the punches
Verb
Meaning
(intransitive, of a boxer) To deflect the force of an opponent's punches by moving the body quickly.
(intransitive, figuratively, by extension) To cope with adversity by being flexible in attitude.
Source: en.wiktionary.org