0

I would like to modify the html as it comes from the webapp before delivering it to the website visitor. However, if the website visitors posts in a web formula the input is also transformed by nginx's subs_filter.

Is it possible to use nginx's subs_filter for GET request only but not for POST?


Similar question (non-duplicate!) nginx sub_filter for GET request only?

1 Answer 1

1

I think you can use subs_filter_bypass directive. From the docs:

You can specify several variables with this directive. If at least one of the variable is not empty and is not equal to '0', this substitution filter will be disabled.

map $request_method $is_post {
    default 0;
    POST 1;
}

server {
    server_name example.com;
    subs_filter ...;
    subs_filter_bypass $is_post;
}
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .