Accept only GET and HEAD requests.