aws / aws-lambda-dotnet

Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Apache License 2.0
1.58k stars 477 forks source link

Additional file type application/wasm to AbstractAspNetCoreFunction.cs #1786

Closed genifycom closed 3 months ago

genifycom commented 3 months ago

Describe the feature

Please can you add application/wasm to AbstractAspNetCoreFunction.cs

This is to allow a DotNet Lambda function to serve up wasm files for WebAssembly.

For reference, see https://github.com/aws/aws-lambda-dotnet/issues/1781

Thank you.

Use Case

So that Dotnet Lambda Blazor can operate in SSR or CSR mode.

Proposed Solution

No response

Other Information

The workaround currently is to add to lambdaEntryPoint

protected override void Init(IHostBuilder builder)
{
    base.RegisterResponseContentEncodingForContentType("application/wasm", Amazon.Lambda.AspNetCoreServer.ResponseContentEncoding.Base64);
}

Acknowledgements

AWS .NET SDK and/or Package version used

Standard Lambda Serverless application under DotNet 8

Targeted .NET Platform

.NET 8

Operating System and version

Windows 11

normj commented 3 months ago

This valid to add. If you want to submit a PR that adds the content type that would help get this released sooner.

ashishdhingra commented 3 months ago

Changes merged to dev. It would be released along with other changes that would be queued shortly.

github-actions[bot] commented 3 months ago

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.