summary refs log tree commit diff
path: root/host/Rory-nginx/hosts/rory.gay/mru.nix
blob: d3099464bbd30bbffeb13fb2a9eac9e5a3efe20d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  enableACME = true;
  addSSL = true;
  root = "/data/nginx/html_mru";
  locations = {
    "/" = {
      index = "index.html";
      extraConfig = ''
        add_header 'Access-Control-Allow-Origin' '*';
        add_header 'Access-Control-Allow-Methods' '*';
        add_header 'Access-Control-Allow-Headers' '*';
        add_header 'Access-Control-Expose-Headers' '*';
        add_header 'Access-Control-Max-Age' 1728000;

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