edit nginx
This commit is contained in:
parent
327694f87d
commit
53495a0b83
10
nginx.conf
10
nginx.conf
|
|
@ -1,3 +1,5 @@
|
|||
log_format main '$time_iso8601 [$request_id] $remote_addr "$request" $status $body_bytes_sent $request_time';
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
|
@ -7,11 +9,17 @@ server {
|
|||
client_body_timeout 300s;
|
||||
client_header_timeout 300s;
|
||||
|
||||
# Access logs with request id
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
# Propagate a request id to clients; backend (API) can echo as session id
|
||||
add_header X-Request-Id $request_id always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy no-referrer-when-downgrade always;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue