Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
github.com/hacdias/caddy-v1-minify
Caddy plugin that implements minification on-the-fly for CSS, HTML, JSON, SVG and XML. It uses tdewolff's library so, let's thank him! You can download this plugin with Caddy on its official download page.
minify paths... {
if a cond b
if_op [and|or]
disable [js|css|html|json|svg|xml]
minifier option value
}
if
statement).and
.true
. The possible options are described bellow.Minifier(s) | Option | Value | Description |
---|---|---|---|
css, svg | decimals | number | Preserves default attribute values. |
xml, html | keep_whitespace | true|false | Preserves whitespace between inline tags but still collapse multiple whitespace characters into one. |
html | keep_end_tags | true|false | Preserves all end tags. |
html | keep_document_tags | true|false | Preserve html , head and body tags. |
html | keep_default_attr_vals | true|false | Preserves default value attributes. |
html | keep_conditional_comments | true|false | Preserves all IE conditional comments. |
For more information about what does each option and how each minifier work, read the documentation of tdewolff/minify.
Minify all of the supported files of the website:
minify
Only minify the contents of /assets
folder:
minify /assets
Only minify css files:
minify {
disable html svg json xml js
}
Minify the whole website except /api
:
minify {
if {path} not_match ^(\/api).*
}
Minify the files of /assets
folder except /assets/js
:
minify /assets {
if {path} not_match ^(\/assets\/js).*
}
Customize the minifier options:
minify {
html keep_document_tags
html keep_whitespace
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.