fix: add Host header for direct IP uploads to route to Forgejo

Without Host header, Traefik routes direct IP requests to the
default backend (hytale-auth) instead of Forgejo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sanasol
2026-02-20 02:03:15 +01:00
parent 5241a502e5
commit e0ebf137fc

View File

@@ -56,6 +56,7 @@ jobs:
[ -f "$file" ] || continue
echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file"
done
@@ -87,6 +88,7 @@ jobs:
[ -f "$file" ] || continue
echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file"
done
@@ -117,6 +119,7 @@ jobs:
[ -f "$file" ] || continue
echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file"
done