Csrf是什么请自行百度哟。
针对Apache
1 2 3 4 5 6 7 |
SetEnvIfNoCase Request_Method post csrf SetEnvIfNoCase Referer ^http://hiwbb\.com !csrf <LocationMatch /> Order Deny, Allow Deny from env=csrf </LocationMatch> |
针对Lighttpd
1 2 3 4 5 |
$HTTP["request-method"] == "POST" { $HTTP["referer"] !~ "^($|http://hiwbb\.com)" { url.access-deny = ( "" ) } } |