aboutsummaryrefslogtreecommitdiffstats
path: root/spring-front/nginx.conf
blob: cf2a208bec71a674adab18127d1cfb9ae6155416 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
events {
  worker_connections 1024;
}
http {
  include /etc/nginx/mime.types;
  server_tokens off;
  limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;
  server {
    listen 443 ssl http2;
    keepalive_timeout 60;
    charset utf-8;
    ssl_certificate /certs/server.cert;
    ssl_certificate_key /certs/server.key;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_session_cache shared:SSL:50m;
    ssl_session_timeout 1d;
    ssl_session_tickets off;
    ssl_prefer_server_ciphers on;
    sendfile on;
    tcp_nopush on;
    add_header X-Content-Type-Options "nosniff" always;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' unpkg.com cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' unpkg.com cdnjs.cloudflare.com; connect-src *;";
    add_header X-Frame-Options SAMEORIGIN always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header Permissions-Policy "geolocation=(self),midi=(self),sync-xhr=(self),microphone=(self),camera=(self),magnetometer=(self),gyroscope=(self),fullscreen=(self),payment=(self),usb=(self)";
    fastcgi_hide_header X-Powered-By;
    resolver 9.9.9.9 208.67.222.222;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /certs/server.cert;
    error_page 401 403 404 /404.html;
    location / {
      root /usr/share/nginx/html;
      index index.html;
      try_files $uri $uri/ =404;
    }
  }
}