Need logic to not check for bad user agent if xml file

lists at lazygranch.com lists at lazygranch.com
Thu Dec 20 09:42:49 UTC 2018


I have a map to check for bad user agents called badagent. I want to
set up a RSS feed. The feedreaders can have funny agents, so I need to
omit the bad agent check if the file is any xml type. 

This is rejected.

        if (($request_uri != [*.xml]) && ($badagent)) {return 444; }

Suggestions?

I can put the xml files in a separate location if that helps.


More information about the nginx mailing list