forked from gillommnathony/loadbalance-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
25 lines (20 loc) · 836 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Don't tell nginx version to clients.
server_tokens off;
# Sendfile copies data between one FD and other from within the kernel,
# which is more efficient than read() + write().
sendfile off;
# Don't buffer data-sends (disable Nagle algorithm).
# Good for sending frequent small bursts of data in real time.
tcp_nodelay on;
#xss protection
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
#cors policy
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
#url rewrite
location / {
try_files $uri $uri/ /index.php$is_args$args;
}