MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009077mantisbtadministrationpublic2008-04-15 23:492009-06-23 15:28
Reporterahalligan 
Assigned Tojreese 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.1.1 
Target Version1.2.0rc1Fixed in Version1.2.0rc1 
Summary0009077: [PATCH] Mantis does not handle forwarded protocol correclty when behind a proxy
DescriptionWhen I run mantis from behind a public proxy and forward https -> http, I experience a problem similar to issue# 0006134. I want to be able to have users access mantis securely from a public address https://mantis.mydomain.com [^] and developers access mantis on the internal network at http://localserver/ [^]

To get things to work properly I simply tweaked the config_defaults_inc.php with the following (please also find patch attached):

$t_protocol = 'http';
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) { // Support ProxyPass
    $t_protocol= $_SERVER['HTTP_X_FORWARDED_PROTO'];
} else if ( isset( $_SERVER['HTTPS'] ) && ( strtolower( $_SERVER['HTTPS'] ) != 'off' ) ) {
    $t_protocol = 'https';
}

This has the system working in both scenarios. Would be great if this tweak could make its way into the next release.

Tagspatch
Attached Filespatch file icon Forwarded Protocol.patch [^] (672 bytes) 2008-04-15 23:49 [Show Content]

- Relationships

-  Notes
User avatar (0021289)
jreese (administrator)
2009-03-30 10:19

Fix committed to 1.2.x development tree.

- Related Changesets
MantisBT: master e9185997
Timestamp: 2009-03-30 13:59:59
Author: jreese
Details ] Diff ]
Fix 0009077: support the HTTP_X_FORWARDED_PROTO header.
mod - config_defaults_inc.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2008-04-15 23:49 ahalligan New Issue
2008-04-15 23:49 ahalligan File Added: Forwarded Protocol.patch
2008-04-15 23:53 ahalligan Note Added: 0017607
2008-04-16 00:30 ahalligan Note Deleted: 0017607
2008-07-13 15:33 vboctor Tag Attached: patch
2008-07-13 15:33 vboctor Status new => acknowledged
2008-07-13 15:33 vboctor Target Version => 1.2.0
2009-03-30 10:19 jreese Note Added: 0021289
2009-03-30 10:19 jreese Status acknowledged => resolved
2009-03-30 10:19 jreese Fixed in Version => 1.2.2
2009-03-30 10:19 jreese Resolution open => fixed
2009-03-30 10:19 jreese Assigned To => jreese
2009-03-30 10:20 jreese Changeset attached master e9185997 =>
2009-06-23 15:28 jreese Status resolved => closed


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.0663 seconds.
memory usage: 3,019 KB
Powered by Mantis Bugtracker