有時候nginx 判斷式還蠻好用的,筆記一下
| $host | http FQDN | 
| $http_user_agent | User agent 瀏覽器類型 | 
| $http_cookie | Cookie 內容 | 
| $request_method | http 類型(GET POST HEAD…等) | 
| $remote_addr | 使用者訪問IP | 
| $scheme | http方式(HTTP、HTTPS) | 
| $server_protocol | http 版本協議(http1.1、http2) | 
| $server_name | Server name | 
| $request_uri | URI (/api/v1/login) | 
| $limit_rate | 速率控制 | 
如果http 版本協議為http1.0 拒絕訪問
if ($server_protocol ~* "HTTP/1.0") {
    return 403;
}