Git Product home page Git Product logo

Comments (4)

lgarron avatar lgarron commented on May 26, 2024

For preloaded sites, we purposely don't show whether a site satisfies current requirements, because not all the same requirements apply to all sites on the list.

You can check for an individual site at the API endpoint:
https://hstspreload.appspot.com/api/v2/preloadable?domain=github.com

Once we have a database to keep track of which requirements apply to which site, we should show this data.

from hstspreload.org.

CurtisLeeBolin avatar CurtisLeeBolin commented on May 26, 2024

Thanks. I'm looking forward to it.

from hstspreload.org.

lgarron avatar lgarron commented on May 26, 2024

Once we have a database to keep track of which requirements apply to which site, we should show this data.

We can now query for bulk preloaded sites efficiently:

bulkPreloaded DomainSet

from hstspreload.org.

lgarron avatar lgarron commented on May 26, 2024

For https://twitter.com/vcsjones/status/910328524954902533

(I apologize ahead of the time that the JS code is not super-clean.)

We actually always race the preloadable and status checks:

Promise
.all([
this._hstsPreload.status(domain),
this._controller.eligible(domain)
])

Right now, we always ignore the preloadable result if the status is preloaded. You have to tell it to show the issues from the preloadable outcome here:

case 'preloaded':
view.setTheme('theme-green');
break;

You'll also want to update the status string to explain "preloaded, but missing out on best practices (technically, requirements)" when there are issues (errors or warnings).

Now, that will have the problem that you don't know if a domain is bulk preloaded, so the string will show even for domains where the requirements don't apply. I suggest attaching this to the status result by extending the DomainState struct with a boolean bulk field based on the protected value, calculated from api.bulkPreloaded like at:

if api.bulkPreloaded[domain] {

You should then be able to read the value in JS and decide to show the issues/custom status based on that.

from hstspreload.org.

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.