Option to disable fog’s signature v4 streaming
Closed this issue · 1 comments
In Fog we can disable AWS’s enable_signature_v4_streaming: false
. This helps when using S3-compatible hosting providers that don’t implement streaming. Without this option an error is raised saying "STREAMING-AWS4-HMAC-SHA256-PAYLOAD" is not implemented.
One workaround is doing the following:
module DisableFogSignatureV4Streaming
def fog_options
super.merge(enable_signature_v4_streaming: false)
end
end
AssetSync.configure do |config|
config.extend(DisableFogSignatureV4Streaming)
# …
end
To make this more robust, we could add a new option to asset_sync
. Either:
- A new
fog_enable_signature_v4_streaming
option. - A more general
fog_options
to add any extra option fog supports.
What do you think? I’d be happy to provide a pull-request if any of these solutions seem good.
I guess the current style would be introducing another option
asset_sync/lib/asset_sync/config.rb
Lines 286 to 303 in d261cd4
But if you want to implement a way to add more flexible fog options that's welcome too
I have no preference :)