I tried following settings without success:
akka {
http {
client.parsing.modeled-header-parsing = off
host-connection-pool.client.parsing.modeled-header-parsing = off
}
Does anyone know how to set user agent header with parsing disabled? I need this for AWS signature, otherwise I get signature error
afaik, you are not required to include all headers in the signature. I would only include those headers that contain actual data and need to be protected against change.
In the Alpakka S3 connector we have code to sign akka-http requests. You might use that as an example or maybe just depend on those classes:
Hi Johannes,
Thanks for your answer. Maybe I didn’t put some background to what I need to achieve…
I am running akka http server as a proxy to ceph s3. Therefore I “forward” user agent from the client.
Client - aws sdk or aws cli prepares signature and decides on what to put to prepare signature.
Indeed when preparing own request I could skip some headers. But not in my case.
Just also to mention similar setting on the server side seems to work:
server.parsing.modeled-header-parsing = off
It is weird though that client setting doesn’t seem to take effect?
I see. Indeed, it seems to be impossible to include a RawHeader("User-Agent") in requests due to this line:
That would have been the escape hatch to forward them unchanged. Could you create a ticket? I don’t see why we shouldn’t support overriding User-Agent headers by RawHeader in the client.