magenx / Magento-nginx-config

Default Nginx config for Magento 2
https://www.magenx.com
GNU General Public License v3.0
506 stars 211 forks source link

Limit requests in extra_protect.conf are stopping Magento's AJAX search functionality #21

Closed lee586 closed 6 years ago

lee586 commented 7 years ago

The zones setup in extra_protect.conf prevent Magento's ajax function from doing searches on the fly. Nginx's error log is full of these errors:

limiting requests, excess: 0.288 by zone "zone3", client: 127.0.0.1, server: mystore.com, request: "GET /search/ajax/suggest/?q=test

I'm not a nginx pro, but is there a way to modify the .conf files to create a whitelist or exception for the localhost 127.0.0.1 so it doesn't get denied by the limit requests in extra_protect.conf?

magenx commented 7 years ago

you can increase search word length or zone limit by default there is 3 letter

benzon commented 7 years ago

you can even just parse out the extra_protect.conf if you want to do that.

lee586 commented 7 years ago

I definitely don't want to comment it out because it does provide a good safeguard against flooding, but I thought there could be a way to make localhost exempt from the zones.