News for hackers. Stuff that matters.
Re:Avoiding the top Nginx configuration mistakes by jrtc27 on Tuesday February 22, 2022 @10:52PM (#30437371)
> The if directive is tricky to use, especially in location{} blocks. It often doesn’t do what you expect and can even cause segfaults.

That's not user error. That's lazy programming and a bug. If your code segfaults because of user input you weren't expecting, that's on you as a programmer.

Re:Avoiding the top Nginx configuration mistakes by mdaniel on Tuesday February 22, 2022 @11:39PM (#30437711)
It wouldn't surprise me if they consider that WONTFIX given they wrote a whole wiki page entitled "If is Evil": https://www.nginx.com/resources/wiki/start/topics/depth/ifis...
Re:Avoiding the top Nginx configuration mistakes by Dylan16807 on Wednesday February 23, 2022 @02:14AM (#30438537)
I can understand why certain directives don't work inside an if, even if segfault is dumb.

Why are the empty if blocks breaking things outside of them?

Re:Avoiding the top Nginx configuration mistakes by jrtc27 on Wednesday February 23, 2022 @12:07AM (#30437884)
Oh I know. Hardly inspires confidence; all of those examples are clear bugs declared features because of poor programming practices.