Modify

Opened 3 years ago

Closed 3 years ago

#11320 closed defect (fixed)

baseurl in stats page doesn't use trac's configuration

Reported by: lee@… Owned by: Roberto Longobardi
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

The baseurl passed to the page template should come from trac.baseurl in trac.ini rather than the request's baseurl.

This causes problems in environments where the trac instance is reverse proxied.

Attachments (1)

stats.py (23.6 KB) - added by Roberto Longobardi 3 years ago.
Patched stats.py

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 years ago by Roberto Longobardi

Status: newaccepted

Hi Lee, I've checked the base Trac code and it looks like using the request's href(...) is the right thing to do.

I've modified the stats code to do that and you can find in attachment the patched version. Build it on top of 1.7.3.

Anyway, if you run your Trac instance behind a reverse proxy, you may try raising the corresponding flag in trac.ini, as described here:

[trac]
use_base_url_for_redirect = True

Please, could you try the patch and tell me if this solves the issue?

Thanks, ciao, Roberto

Changed 3 years ago by Roberto Longobardi

Attachment: stats.py added

Patched stats.py

comment:2 Changed 3 years ago by Roberto Longobardi

comment:3 Changed 3 years ago by Roberto Longobardi

Resolution: fixed
Status: acceptedclosed

Modify Ticket

Action
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.