Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002404TestLinkGeneralpublic2009-04-20 21:282012-06-18 19:44
ReporterMarioMancino 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Fixed in Version 
Summary0002404: TestLink won't work behind a proxy, URL is rewritten.
DescriptionWe are using TestLink behind a proxy for various reasons, but unfortunatly TestLink doesn't have a static way of setting the url's.
Instead all links are pointing to the actual server, rendering the proxy useless.

Since all urls are based on the get_home_url() Function in the 'lib/functions/configCheck.php' file, a simple check for the HTTP_X_FORWARED_HOST would detect a proxy:

@@ -63,6 +63,11 @@
         $t_path = '';
     }
 
+ if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
+ $t_host = $_SERVER['HTTP_X_FORWARDED_HOST'];
+ $t_port = '';
+ }
+
    $t_url = $t_protocol . '://' . $t_host . $t_path.'/';
     
     return ($t_url);
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0006489)
fman (administrator)
2009-04-21 16:12

>> Instead all links are pointing to the actual server, rendering the proxy useless.

this has been done to simplify configuration

I do not fully understand how you change do the magic?
Where static url has to be configured ?
Please explain better.
(0006494)
MarioMancino (reporter)
2009-04-21 16:39

There's no static url, but by checking the forwarded host you can determine whether the page was requested directly or via a proxy. If it is set, you can use the the HTTP_X_FORWARDED_HOST variable which will give you the name with appended port (if necessary).

Without rewriting the link all will work fine, but the actual server will be exposed and used instead of the proxy.
(0006499)
fman (administrator)
2009-04-21 17:57

OK, thanks , I will add code and test
(0011975)
kknight (reporter)
2010-10-19 17:05

I wonder what the status of this ticket is? We are using TestLink 1.9 (Beta 3 - Development), and still see this issue. Regardless of where you are in TestLink, the URL remains -

http://eng:9000/testlink/index.php [^]
(0011977)
fman (administrator)
2010-10-19 18:12

Have no way to do accurate tests => ask your help to make change suggested, tests and give us feedback
do you think you can do this ?
(0011998)
fman (administrator)
2010-10-20 13:09

@kknight
any news ?
(0016908)
rtoliveira (reporter)
2012-06-18 19:44

I reproduced this issue and the MarioMancino's patch doesn't work

- Issue History
Date Modified Username Field Change
2009-04-20 21:28 MarioMancino New Issue
2009-04-21 16:12 fman Note Added: 0006489
2009-04-21 16:12 fman Status new => feedback
2009-04-21 16:39 MarioMancino Note Added: 0006494
2009-04-21 17:57 fman Note Added: 0006499
2009-04-21 17:58 fman Status feedback => assigned
2009-04-21 17:58 fman Assigned To => fman
2010-10-19 17:05 kknight Note Added: 0011975
2010-10-19 18:12 fman Note Added: 0011977
2010-10-20 13:09 fman Note Added: 0011998
2012-06-18 19:44 rtoliveira Note Added: 0016908



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker