summary refs log tree commit diff
path: root/host/Rory-nginx/services/nginx/rory.gay/mru.nix
blob: 76fb6d8b2684a0ee5b6e39b45a208725ce9bd6db (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
{
  enableACME = true;
  addSSL = true;
  quic = true;
  http3 = true;
  http3_hq = true;
  kTLS = true;
  root = "/data/nginx/html_mru";
  reuseport = true;
  extraConfig = ''
    brotli off;
    brotli_static off;
    '';
  locations = {
    "/" = {
      index = "index.html";
      extraConfig = ''
        more_set_headers 'Access-Control-Allow-Origin: *';
        more_set_headers 'Access-Control-Allow-Methods: *';
        more_set_headers 'Access-Control-Allow-Headers: *';
        more_set_headers 'Access-Control-Expose-Headers: *';
        more_set_headers 'Access-Control-Max-Age' 1728000;

        # default to /index.html if file not found
        try_files $uri $uri/ /index.html;
      '';
    };
  };
}