knowledgebase_law/node_modules/refractor/lang/hsts.js

21 lines
401 B
JavaScript
Raw Normal View History

2025-04-11 23:47:09 +08:00
'use strict'
module.exports = hsts
hsts.displayName = 'hsts'
hsts.aliases = []
function hsts(Prism) {
/**
* Original by Scott Helme.
*
* Reference: https://scotthelme.co.uk/hsts-cheat-sheet/
*/
Prism.languages.hsts = {
directive: {
pattern: /\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,
alias: 'property'
},
operator: /=/,
punctuation: /;/
}
}