Skip to content

Commit

Permalink
Update nginx/domains/firmware.ffmuc.net.conf
Browse files Browse the repository at this point in the history
Co-authored-by: DasSkelett <[email protected]>
  • Loading branch information
T0biii and DasSkelett authored Oct 30, 2024
1 parent 818b5f1 commit 750408a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nginx/domains/firmware.ffmuc.net.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ map $http_x_firmware_version $firmwareVersion {
default "unknown";
}

map $firmwareVersion $targetDirectory {
# Returns on first match
"unknown" $latest_v2022_5;

"~^201[0-9]\." $latest_v2022_5;
"~^202[0-1]\." $latest_v2022_5;
"~^2022\.[0-4]\." $latest_v2022_5;
"~^2022\.5\.[0-7]" $latest_v2022_5;

"~^202[2-3]\." $latest_v2024_6;
"~^2024\.[0-5]\." $latest_v2024_6;

# Else keep requested branch (stable/testing/experimental)
default "keep";
}

server {
listen 80 default_server;
listen [::]:80 default_server;
Expand Down

0 comments on commit 750408a

Please sign in to comment.