Welcome! Log In Create A New Profile

Advanced

Re: sub_filter not working on JSON file

August 02, 2018 10:12AM
Yeah, the sub_filter_types is fine, if I set it correctly it does not work. So I tested by using
Sub_filter_types *;
This works fine which makes me wonder what Nginx is seeing as the mime type of this json file. I'll dig through the upstream variables again but I don't recall seeing it unless it's right in front of my face and I'm being blind to it.

___________________________________________
Michael Friscia
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile
http://web.yale.edu http://web.yale.edu/


On 8/2/18, 9:49 AM, "Dmitry Volyntsev" <xeioex@nginx.com> wrote:



On 02.08.2018 16:46, Friscia, Michael wrote:
> I’m trying to figure out why my sub_filter is not working on a JSON
> file. I do have application/json and text/json listed in the
> sub_filter_types but the simple string replace is not happening. It
> causes me to think that for whatever reason, Nginx is not seeing this
> file as JSON. Is there a way to output what mime type the file from the
> upstream server is so I can make sure I have the right filter type?
>
> Or, is there something I should also be doing to make the sub_filter
> work on a JSON file?
>

Hi,

Do not forget to configure sub_filter_types appropriately.



> ___________________________________________
>
> Michael Friscia
>
> Office of Communications
>
> Yale School of Medicine
>
> (203) 737-7932 - office
>
> (203) 931-5381 - mobile
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fweb.yale.edu&amp;data=02%7C01%7Cmichael.friscia%40yale.edu%7Cbb4162e4f4dc4c2b17f308d5f87ed329%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C636688145950069464&amp;sdata=Kam1ZbqWD8GXtkGJdvmR7M4sMheqYuPM5OSTEmw5RXE%3D&amp;reserved=0 https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fweb.yale.edu%2F&amp;data=02%7C01%7Cmichael.friscia%40yale.edu%7Cbb4162e4f4dc4c2b17f308d5f87ed329%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C636688145950069464&amp;sdata=mfo%2FF4pMFLM3BTDQ6Xtm3ryesxM09Ci%2BYsv37TBbGCg%3D&amp;reserved=0
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx&amp;data=02%7C01%7Cmichael.friscia%40yale.edu%7Cbb4162e4f4dc4c2b17f308d5f87ed329%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C636688145950079469&amp;sdata=93k%2BaN0xhqYb9BqOhE4kCwKbAjue2L2Fb%2FwAg0krldI%3D&amp;reserved=0
>


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

sub_filter not working on JSON file

wickedhangover August 02, 2018 09:48AM

Re: sub_filter not working on JSON file

Dmitry Volyntsev August 02, 2018 09:52AM

Re: sub_filter not working on JSON file

wickedhangover August 02, 2018 10:12AM

Re: sub_filter not working on JSON file

Maxim Dounin August 02, 2018 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready