From 2445c0f13d7cfdf26163d5ade825a473220da126 Mon Sep 17 00:00:00 2001 From: raykholo Date: Mon, 26 Oct 2026 06:49:50 +0000 Subject: [PATCH] Flatpak repository: always publish its HTTPS URL (#4864) (#4875) GitHub Pages reports the base URL as http:// for the custom domain, so the .flatpakrepo file, the remote-add line on the repository page and the mirror of the previous repository all used plain HTTP. Force https:// once where the base URL is read. --- packaging/flatpak-site.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/flatpak-site.sh b/packaging/flatpak-site.sh index c48bd47d7..84e4d4ab0 100644 --- a/packaging/flatpak-site.sh +++ b/packaging/flatpak-site.sh @@ -35,6 +35,9 @@ repo_dir="$site/flatpak/repo" mkdir -p "$repo_dir" ostree --repo="$repo_dir" init --mode=archive-z2 base_url="${PAGES_BASE_URL%/}" +# Pages reports its base URL as http:// for a custom domain; the repository is always fetched over +# HTTPS (the remote URL is stored by every client that adds it). +base_url="https://${base_url#*://}" previous_url="$base_url/flatpak/repo" if curl --fail --silent --location --output /dev/null "$previous_url/summary"; then ostree --repo="$repo_dir" remote add --no-gpg-verify previous "$previous_url"