Server-side modification of header seems to cause SignatureDoesNotMatch error

Thank you for your response!

I’ll avoid the error using solution 1.