global log 127.0.0.1 local0 warning log 127.0.0.1 local1 chroot /var/lib/haproxy stats socket /run/haproxy_admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon maxconn 5000 lua-load /var/app/deploy/haproxy-lua-cors/cors.lua lua-load /var/app/deploy/haproxy-lua-cachecontrol/cachecontrol.lua # Default SSL material locations ca-base /etc/ssl/certs crt-base /etc/ssl/private defaults log global mode http retries 3 timeout check 60s timeout client 200s timeout connect 200s timeout http-keep-alive 65s timeout queue 1m timeout server 200s option httplog option redispatch balance roundrobin listen stats bind *:8888 mode http option httpclose stats refresh 10s stats uri /haproxy-status stats realm Haproxy\ Statistics frontend grass_frontend bind *:8080 mode http acl valid_http_method method GET POST PUT HEAD PATCH OPTIONS DELETE http-request deny if ! valid_http_method http-request add-header X-Forwarded-Proto http http-request lua.cors http-response lua.cors "GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE" "*" http-response add-header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" http-response add-header X-Content-Type-Options nosniff http-response add-header X-Frame-Options SAMEORIGIN http-response add-header Referrer-Policy same-origin http-response lua.cachecontrol option forwardfor default_backend grass_backend backend grass_backend server grass_process01 127.0.0.1:8000 check inter 3000 rise 2 fall 3 server grass_process02 127.0.0.1:8001 check inter 3000 rise 2 fall 3 server grass_process03 127.0.0.1:8002 check inter 3000 rise 2 fall 3 server grass_process04 127.0.0.1:8003 check inter 3000 rise 2 fall 3 server grass_process05 127.0.0.1:8004 check inter 3000 rise 2 fall 3 server grass_process06 127.0.0.1:8005 check inter 3000 rise 2 fall 3 server grass_process07 127.0.0.1:8006 check inter 3000 rise 2 fall 3 server grass_process08 127.0.0.1:8007 check inter 3000 rise 2 fall 3 option httpchk GET /hello/