Nginx 超时配置

client_header_timeout

客户端向服务端发送一个完整的 request header 的超时时间。如果客户端在指定时间内没有发送一个完整的 request header,Nginx 返回 HTTP 408(Request Timed Out)。

Defines a timeout for reading client request header. If a client does not transmit the entire header within this time,
the 408 (Request Time-out) error is returned to the client.


CSRF 简介

CSRF 是什么?

CSRF(Cross-site Request Forgery)跨站请求伪造,缩写为:CSRF/XSRF。 也被称为:one click attack/session riding。

siege 压测工具

简介

siege 是一款高性能的 http 压力测试工具。
siege 支持身份验证、 cookies、 http、 https 和 ftp 协议。

应用举例

1. 对指定站点进行压测

siege -c 300 -t 5s URL

2.文件中包含的若干URL进行批量测试

siege -c 300 -t 5s -f URL_File_Name

3. 支持多个Header参数

siege -c 300 -t 5s -H "Authorization: XXXX" -H "SX: 1212" URL

4. 支持application/json方式请求

siege -c 300 -t 5s 'URL POST < data.json'
siege -c 300 -t 5s 'URL PUT < data.json'