Problems with map + subfilter + proxy

Francis Daly francis at
Thu Nov 8 01:10:33 UTC 2018

On Wed, Nov 07, 2018 at 08:47:15PM -0200, Jorge Pereira wrote:

Hi there,

>     location /artifactory/ {
>       sub_filter_types $subfilter_allowed_content_type;   # the
> variable is filled up correctly
>       #sub_filter_types "application/atom+xml";           # but, when
> use it hardcode. then it works fine.

If the documentation for a directive (available here at does not say that the value can
contain variables, then the value probably does not process $variable

>       sub_filter "https://$host" http://$host";           # it works
> only when use sub_filter_types with hardcore value.

Compare with the documentation for this directive -

> Conclusion: the variable it been filled up correctly, but the
> sub_filter_types looks to not process. Someone has any suggestion?

sub_filter_types does not read variables. If you set the type to the
string "$subfilter_allowed_content_type", sub_filter might take effect. (I
haven't tested, since it is not a useful case, I think.)

Francis Daly        francis at

More information about the nginx mailing list