server {
    listen 80;
    server_name _;
    root /usr/share/nginx/html;
    index index.html;

    location = / {
        return 301 /homepage;
    }

    location /_next/static/ {
        expires 365d;
        add_header Cache-Control "public, immutable";
    }

    location /assets/ {
        expires 30d;
        add_header Cache-Control "public";
    }

    location /fonts/ {
        expires 365d;
        add_header Cache-Control "public, immutable";
    }

    location ~* \.apk$ {
        default_type application/vnd.android.package-archive;
        expires 30d;
        add_header Cache-Control "public";
    }

    location / {
        try_files $uri $uri.html $uri/index.html =404;
    }

    error_page 404 /404.html;
}

