server {
    listen 80;
    listen [::]:80;
    server_name fdroid.jombo.uk;

    root /app;
    index index.html;
    autoindex on;

    location /repo/ {
        add_header Access-Control-Allow-Origin *;
        try_files $uri $uri/ =404;
    }

    location /archive/ {
        add_header Access-Control-Allow-Origin *;
        try_files $uri $uri/ =404;
    }

    # Hide F-Droid configuration and metadata source files
    location ~* \.yml$ {
        deny all;
    }

    location ~* /metadata/ {
        deny all;
    }
    
    location /keystore.p12 {
        deny all;
    }
}
