-1

Hi I'm trying to do this:

 $HTTP["url"] =~ "/([^/?]+)$" {
    setenv.add-response-header = (
    "Content-Disposition" => "attachment; filename=$1"
    )
 }

but it did not replace $1 with what stored in the regex but just $1 characters.

I'm wondering if something like this is possible in lighttpd.

It seems like the search/replace with regex only works in those redirect syntaxes.

romerun
  • 2,161
  • 3
  • 18
  • 25

1 Answers1

0

I've found the answer. It has to be done through mod_magnet which binds LUA scripting over lighttpd config.

romerun
  • 2,161
  • 3
  • 18
  • 25