mirror of
https://github.com/maillab/cloud-mail.git
synced 2026-04-25 08:16:01 +03:00
[PR #240] [MERGED] fix: Handle HTTP redirects in workflow curl requests #256
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloud-mail-maillab#256
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maillab/cloud-mail/pull/240
Author: @ifsheldon
Created: 1/21/2026
Status: ✅ Merged
Merged: 1/22/2026
Merged by: @eoao
Base:
main← Head:main📝 Commits (2)
d0800cfupdate workfloweebf38afix workflow📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
.github/workflows/deploy-cloudflare.yml(+2 -2)📄 Description
Summary
Fix deployment workflow failures caused by HTTP redirects when
CUSTOM_DOMAINis configured without thehttps://protocol prefix.Problem
When users configure
CUSTOM_DOMAINwithout the protocol (e.g.,mail.example.cominstead ofhttps://mail.example.com), the curl requests fail because:HTTP 301 redirects are not followed - The server redirects HTTP → HTTPS, but curl doesn't follow redirects by default, resulting in:
POST body is lost on redirect - Even with
-L(follow redirects), curl converts POST → GET when following 301/302 redirects, causing the JSON body to be discarded. This results in:Solution
Commit 1: Add
-Lflag to follow redirects (d0800cf)-Lflag to both curl commands in the "Initialize database" and "Set up email receiving" stepsCommit 2: Preserve POST method through redirects (
eebf38a)--post301 --post302 --post303flags to the POST request in "Set up email receiving" stepChanges
.github/workflows/deploy-cloudflare.ymlTesting
CUSTOM_DOMAINset withouthttps://prefixRecommendation
For best results, users should still configure
CUSTOM_DOMAINwith the full URL including protocol:This avoids the redirect overhead entirely.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.