So long as the filter and pump cannot have relative movement....even rubber mounting the filter or having a short 20mm rubber section after the 180 degree turn.
Consider even Rotax has multiple rubber elements in the pump assembly even though there should be no relative movement....vibration can very quickly crack metal pipework...