Updated Searx with haproxy (markdown)

Arthur Țițeică 2016-10-30 10:19:35 +02:00
parent be340b6541
commit a7e9bcf007
1 changed files with 27 additions and 1 deletions

@ -23,4 +23,30 @@
server python2_searx 127.0.0.1:8888 maxconn 50 check inter 5m rise 1 fastinter 1s downinter 1s
backend other_site
server nginx [...]
server nginx [...]
## Static asset compression
Modify the searx backend declared in haproxy by adding the following
backend searx
[...]
compression algo gzip
compression type text/html text/plain text/css application/javascript
## Security
backend searx
[...]
http-response set-header Strict-Transport-Security max-age=15768000
http-response set-header X-Frame-Options SAMEORIGIN
http-response set-header X-Content-Type-Options nosniff
http-response set-header X-XSS-Protection "1; mode=block"
http-response set-header Content-Security-Policy "default-src 'none';script-src 'self' 'unsafe-eval' 'unsafe-inline';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self'"
## Change the server header response.
By default the 'Server' header of Searx is: "Server: Werkzeug/0.11.11-dev Python/2.7.12".
You may change this to anything else with
backend searx
http-response set-header Server Apache-Nginx