Modify

Opened 10 months ago

Closed 7 months ago

#11320 closed defect (fixed)

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

Reported by: lee@… Owned by: seccanj
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 seccanj 7 months ago.
Patched stats.py

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 months ago by seccanj

  • Status changed from new to accepted

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 7 months ago by seccanj

Patched stats.py

comment:3 Changed 7 months ago by seccanj

  • Resolution set to fixed
  • Status changed from accepted to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from seccanj. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.