Giter Site home page Giter Site logo

Comments (4)

chucklu avatar chucklu commented on May 12, 2024

It would be better if you can add the fallback section for sri check.

https://stackoverflow.com/questions/40408636/handling-load-error-within-subresource-integrity-check
https://github.com/JackuB/subresource-integrity-fallback/
https://github.com/cyph/sri-fallback

asp-fallback-test
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/script-tag-helper?view=aspnetcore-5.0

from blog.

chucklu avatar chucklu commented on May 12, 2024

There is another interesting thing about sri when you checkout js files with git.
https://stackoverflow.com/questions/3206843/how-line-ending-conversions-work-with-git-core-autocrlf-between-different-operat

You will need to configure .gitattributes to make sure the js files are correctly checked out. It's for fallback purpose, when fallback you might use the js file from local instead of the cdn.
https://github.com/dotnet/aspnetcore/pull/36115/files
https://github.com/dotnet/aspnetcore/pull/20537/files

from blog.

dreamapplehappy avatar dreamapplehappy commented on May 12, 2024

It would be better if you can add the fallback section for sri check.

https://stackoverflow.com/questions/40408636/handling-load-error-within-subresource-integrity-check
https://github.com/JackuB/subresource-integrity-fallback/
https://github.com/cyph/sri-fallback

asp-fallback-test
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/script-tag-helper?view=aspnetcore-5.0

@chucklu 谢谢建议,关于fallback这部分我这篇文章中没有提及,之前也研究了一下;后续如果时间允许的话我会把相关的内容再跟大家分享一下。

from blog.

dreamapplehappy avatar dreamapplehappy commented on May 12, 2024

There is another interesting thing about sri when you checkout js files with git.
https://stackoverflow.com/questions/3206843/how-line-ending-conversions-work-with-git-core-autocrlf-between-different-operat

You will need to configure .gitattributes to make sure the js files are correctly checked out. It's for fallback purpose, when fallback you might use the js file from local instead of the cdn.
https://github.com/dotnet/aspnetcore/pull/36115/files
https://github.com/dotnet/aspnetcore/pull/20537/files

@chucklu 关于这部分我还没有研究过,后面可以研究一下,谢谢分享。

from blog.

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.