28 lines
791 B
Nginx Configuration File
28 lines
791 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
# Serve version manifest as JSON
|
|
location = /api/mirror-os/version {
|
|
alias /usr/share/nginx/html/version.json;
|
|
default_type application/json;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
|
|
# Serve APK with correct content type
|
|
location = /mirror-os-remote.apk {
|
|
default_type application/vnd.android.package-archive;
|
|
add_header Content-Disposition 'attachment; filename="mirror-os-remote.apk"';
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
|
|
# Health check
|
|
location = /health {
|
|
return 200 '{"status":"ok"}';
|
|
default_type application/json;
|
|
}
|
|
}
|