The exception
IRC R316.5.11 allows spray foam on sill plates and headers without a thermal barrier where installed thickness, density and both surface-burning indices are within its limits. Every one of those four is a number the maker has to publish before the exception can be shown to apply.