[ postfixadmin-Bugs-3039042 ] absolute vs. relative "Location:" redirects
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2010-09-14 08:31:24
|
Bugs item #3039042, was opened at 2010-08-03 21:55 Message generated for change (Comment added) made by gingerdog You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3039042&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v2.3.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: gw0 (gw0) Assigned to: Nobody/Anonymous (nobody) Summary: absolute vs. relative "Location:" redirects Initial Comment: I noticed that every time I try to add a new domain alias, the following page opens "/postfixadmin/create-alias-domain.php" to display it successfully done its job. Unfortunately I am using a reverse proxy on some other URL (not /postfixadmin/) that opens pages on the server where Postfix Admin lives (here it is in /postfixadmin). All other pages and functions seem to work fine, problems are just with adding new domain aliases. It seems that there is a hardcoded URL of some sort and it would be better to use relative links like everywhere else. ---------------------------------------------------------------------- >Comment By: GingerDog (gingerdog) Date: 2010-09-14 08:31 Message: Use relative URLs where possible - ideally we could get rid of $CONF['postfix_admin_url'] then. ---------------------------------------------------------------------- Comment By: Christian Boltz (christian_boltz) Date: 2010-09-11 23:48 Message: Just a technical explanation: create-alias-domain.php has (technically correct): header("Location: " . $CONF['postfix_admin_url'] . "/main.php"); edit-alias.php has (not really correct because redirects have to use absolute URLs, but it seems to work with all browsers even with relative paths) header ("Location: list-virtual.php?domain=$fDomain"); oh, and create-alias does not do any redirects ;-) That said: we should use absolute _or_ relative redirects, but not a mix of it. Funnily, the technically wrong solution (relative redirects) tend to be the better solution because they work even if $CONF['postfix_admin_url'] is incorrect. It seems all browsers accept it since nobody complained yet that for example the edit-alias redirect doesn't work. GingerDog: what is your opinion about this? ---------------------------------------------------------------------- Comment By: gw0 (gw0) Date: 2010-08-03 22:07 Message: Ok, it seems $CONF['postfix_admin_url'] is being used and I misconfigured it. It is weird though that adding normal aliases works fine... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3039042&group_id=191583 |