DEV Community

Discussion on: Restriction of user access to the website running on nginx

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Using ifs in nginx is maybe not the best idea... (source)

Collapse
 
sm0k3 profile image
Uladzislau Murashka

Possibly yes, problems may appear, but I used this approach on live project. Before I tested it of course on pre-prod environment, but in the end - it worked well, without any issues (in my case).

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

It's not like having a single if in your nginx.conf will instantly sigfault your webapp, server and possibly your fridge too. But the fact that it's so weird and unstable may have a negative effect on maintainability.