Coder Social home page Coder Social logo

Comments (10)

Yves57 avatar Yves57 commented on July 25, 2024 2

Maybe adding "image/svg+xml" to the default types.

from basicmiddleware.

muratg avatar muratg commented on July 25, 2024

Putting in 1.1.0 for now. We can move it to 1.2.0 if we can't finish this off in time.

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

GZipStream allocations: https://github.com/dotnet/corefx/issues/12549

from basicmiddleware.

muratg avatar muratg commented on July 25, 2024

@Tratcher Per PM decision, version numbers for new packages will be 1.0.0-preview1 for the initial release. (Not 1.1.0-preview1)

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

Review feedback:

  • Should the services be registered as singleton or transient? Eilon said Singleton.
  • Split ResponseCompressionExtensions by services vs appbuilder.
  • Rename EnableHttps to EnableForHttps
  • Try binding Options from Config
  • Configurable services should resolve their own options rather than being instantiated, configured, and registered as instances.
  • See how MVC adds filters, something about adding the type to am list on options and then creating the type from DI.
  • Remove the AddResponseCompression(params string[]) overload, investigate defaults and wildcards instead. Text/*, Application/javascript. #121

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

Reading from config works pretty well:

{
  "section": {
    "EnableForHttps": true,
    "MimeTypes": ["text/plain", "text/html"]
  }
}
            services.AddResponseCompression(options =>
            {
                Configuration.GetSection("section").Bind(options);
            });

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

Possible default mime types (things used by the template, static files):
text/css
text/html
application/javascript

WebApi:
application/xml
text/xml
application/json
text/json
application/json-patch+json

Other:
text/plain

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

@Yves57 justification? We're not trying to capture every possible type, just the ones to make the 90% scenario work. I based this list on the files included in the full WebApp template, as well as those types from MVC/WebAPI.

from basicmiddleware.

Tratcher avatar Tratcher commented on July 25, 2024

Closing this now that we've worked through the main checklists. Further questions, feedback, etc. should be filed in new issues.

from basicmiddleware.

Yves57 avatar Yves57 commented on July 25, 2024

@Tratcher Because SVG is a standard included in W3C recommandations. So I don't think it's "exotic"...

from basicmiddleware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.