Issue with Filter plugin

I’ve setup Deluge in a Docker container and now I’m trying to add this theme to it: Deluge Dark

Using the Filter plugin I added this code (note that the replacement in this example is just for testing; I’ll be adding the real replacement once I get the filter plugin itself working):

# Requires: http.filter
(myFilters) {

  filter rule {
      path /delugedoc
      content_type text/html.*
      search_pattern </head>
      replacement hi\n</head>
  }
}

Then in my server block I import myFilters.

As soon as I go to load ANY of my reverse proxies then, I get a 500 internal server error, and the Caddy error log says this (2 examples):

28/Mar/2019:11:40:21 -0500 [PANIC /organizrv2doc/] caddyhttp/httpserver/responsewriterwrapper.go:55 - *filter.responseWriterWrapper is not a closeNotifier
28/Mar/2019:11:40:35 -0500 [PANIC /monitorrdoc/] caddyhttp/httpserver/responsewriterwrapper.go:55 - *filter.responseWriterWrapper is not a closeNotifier

Commenting out the import allows the server to run fine again.

I’m not real familiar with coding in Go, so the error isn’t very descriptive to me. Also from my understanding, there’s no inheritance in the caddyfile, so it’s placement in the file shouldn’t make any difference, am I correct? Anyone have any ideas on a solution?

TIA

Hi @J_Scott_Elblein,

More than likely you’ll want to fill out an issue at the plugin’s Github repo (GitHub - echocat/caddy-filter: Provides a directive to filter response bodies in caddy.) so that the developer can get on top of this bug (the fact that it only appears with the filter plugin active is a good indicator that it’s not the core Caddy code bugging out).

What Caddy version are you using?

1 Like

Hi @Whitestrake

That’s what I figured as well but thought it was weird I’d be the only one having this problem.

I’m currently using Caddy 0.11.1. I haven’t been able to download the latest version for a long time now due to one of the (unknown) plugins causing build failure.

I wish I could help, but there’s a chance it’s already been fixed in a newer version.

That’s… a lot of plugins. Somebody’s got to do the detective work, and all those plugins are developed separately to Caddy. I don’t know which one’s causing an issue. The best advice I can give is to try with no or very few plugins and add more back in batches to narrow it down faster.

1 Like

I managed to get the latest Caddy version after a bunch of trial and error, and that did fix the filter issue as well.

Re: the # of plugins; I know lol, I’ve always been a plugin/feature freak. Kinda like buying a Lamborghini that can go 200 mph when you only usually drive no higher than 65 daily, but once in awhile you might wanna go nuts, or use it to pass a slow poke in the left lane. :wink:

Thanks Matt, I always appreciate your help. :+1:

1 Like

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