From 4626a691856fef78a08a030a7fcf7252766dd17a Mon Sep 17 00:00:00 2001 From: Starystars67 Date: Thu, 2 Apr 2026 02:13:11 +0100 Subject: [PATCH] Serve .msi as download and update installer link Add nginx rule to serve .msi files as application/octet-stream with Content-Disposition: attachment and X-Content-Type-Options: nosniff, returning 404 when missing. Update Home.vue to build the installer download URL from import.meta.env.BASE_URL and bind it to the CTA link (using :href) instead of a hardcoded path, ensuring the installer link respects the app base URL. --- nginx.conf | 7 +++++++ src/views/Home.vue | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index c3e7e51..34bccc2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -12,6 +12,13 @@ server { try_files $uri $uri/ /index.html; } + location ~* \.msi$ { + default_type application/octet-stream; + add_header Content-Disposition 'attachment'; + add_header X-Content-Type-Options nosniff; + try_files $uri =404; + } + # Let real 404s for assets return 404s; Vue handles route-level 404 via the SPA fallback above. location /static/ { diff --git a/src/views/Home.vue b/src/views/Home.vue index 8fd07d0..77b2598 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -24,6 +24,7 @@ const totalServers = ref('...') const isLoading = ref(true) const heroImageLoaded = ref(false) const heroImageSrc = ref(landingLq) +const installerDownloadUrl = `${import.meta.env.BASE_URL}installer/BeamMP_Installer.msi` onMounted(async () => { try { @@ -193,7 +194,7 @@ const faqs = computed(() => [