Last active
May 19, 2021 01:48
-
-
Save joelemanoel/bc94d7a7c6185a49af5dd82bd8d01e5a to your computer and use it in GitHub Desktop.
create .htaccess and block curl user agent on MK-Auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for filename in /opt/mk-auth/*; do | |
echo 'BrowserMatchNoCase "curl" bots | |
Order Allow,Deny | |
Allow from All | |
Deny from env=bots' >> $filename'/.htaccess'; | |
done | |
echo 'BrowserMatchNoCase "curl" bots | |
Order Allow,Deny | |
Allow from All | |
Deny from env=bots' >> '/var/www/.htaccess'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment