Skip to content

[*] Disable Compression option#121

Merged
Gekctek merged 1 commit intoedjCase:masterfrom
amoraller:master
May 25, 2023
Merged

[*] Disable Compression option#121
Gekctek merged 1 commit intoedjCase:masterfrom
amoraller:master

Conversation

@amoraller
Copy link
Copy Markdown
Contributor

@amoraller amoraller commented May 22, 2023

If i have multiple middlewares, a want use one compression setting for all middlewares.
For example:

builder.Services.AddResponseCompression(option => .....);
...
app.UseCompression();
app.Use<Middlware1>();
app.UseJsonRpc(options => ....));
app.Use<Middlware2>();

Today i can disable internal EdjCase compressor with

{    //Костыль отключает компрессию в  EdjCase
    var t = typeof(EdjCase.JsonRpc.Common.RpcError).Assembly.GetType("EdjCase.JsonRpc.Common.Tools.IStreamCompressor");
    builder.Services.AddScoped(t, sp => null);
}

Copy link
Copy Markdown
Collaborator

@Gekctek Gekctek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the contribution

@Gekctek Gekctek merged commit 22402a8 into edjCase:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants