Minify support wildcards?

minify https://caddyserver.com/docs/minify seems handy almost an equivalent function of nginx pagespeed module’s filters for minification etc :slight_smile:

would it support wildcard paths ?

i.e.

minify  {
    only */js/jquery
}

so any directory url containing /js/jquery ? like /js/jquery and /blog/js/jquery would both match ?

(Pinging @hacdias)

If @hacdias wishes, an easy way out is to integrate if conditions and something like if {path} ends_with /js/query will be possible.

2 Likes

I like the @abiosoft idea! What do you think?

if {path} starts_with /sth/
if {path} ends_with /sth.js
if {path} is /sth/sth.css
1 Like

@hacdias you can look at setup.go file for redir to see how to integrate it. Feel free to ping me if you have any questions. :slight_smile:

2 Likes

Sure, thanks! :smiley:

Hey @eva2000,

I’ve made some updates to caddy-minify and now it supports if and if_op and I’ve removed my own directives. If you want to run it right now, you have to build Caddy from source. Then, check the new syntax here. It will be available on caddyserver.com in undetermined time (c.c. @matt).

:smiley: Thanks for having this excellent idea!

1 Like

@hacdias thanks for the heads up - this will be useful :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.