trashmail/nginx/conf/nginx.conf

49 lines
876 B
Nginx Configuration File

#user nobody;
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log;
events {
worker_connections 65535;
use epoll;
multi_accept on;
}
http {
access_log off;
resolver 127.0.0.11 ipv6=off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
client_header_timeout 10;
client_body_timeout 10;
send_timeout 10;
server_tokens off;
lua_package_path '/etc/nginx/lua/modules/?.lua;;';
lua_socket_log_errors off;
server {
listen 80;
server_name _;
location ~ ^/(check|10minutemail|disposable)/(raw|json|xml|status)$ {
add_header X-Request-Id $request_id;
content_by_lua_file lua/mail.lua;
}
location ~ ^/(validate|valid)/(raw|json|xml|status)$ {
if ($request_method != POST) {
return 400;
}
content_by_lua_file lua/validator.lua;
}
}
}