diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2018-05-31 10:12:49 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2018-05-31 10:12:49 +0200 |
commit | 62d5b439fe1a2c9e7a30fd16a1f598e06dc6381c (patch) | |
tree | e560573bba05cb9feb69161625a6fd11873f2b93 /bin/tracker_service.py | |
parent | ffadbf28e28c0c89b1b8ad80d14d3cdc9e0e4876 (diff) |
Make the security tracker relocatable to another base URL
Hosting the tracker at an URL different from /tracker/ was not possible
without these changes. There's still one small glitch left with the
hardcoding of /tracker/logo.png in static/style.css.
Diffstat (limited to 'bin/tracker_service.py')
-rwxr-xr-x | bin/tracker_service.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/tracker_service.py b/bin/tracker_service.py index 6727b67d63..8757d0c4da 100755 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -121,11 +121,6 @@ class BugFilter: return no_dsa_reason == 'postponed' and not self.params['nopostponed'] class TrackerService(webservice_base_class): - head_contents = compose( - LINK(' ', href="/tracker/style.css"), - SCRIPT(' ', src="/tracker/script.js"), - ).toHTML() - nvd_text = P('''If a "**" is included, the urgency field was automatically assigned by the NVD (National Vulnerability Database). Note that this rating is automatically derived from a set of known factors about the @@ -1492,8 +1487,12 @@ Debian bug number.'''), on_load = "selectSearch()" else: on_load = None + head_contents = compose( + LINK(' ', href=url.scriptRelative("style.css")), + SCRIPT(' ', src=url.scriptRelative("script.js")), + ).toHTML() return HTMLResult(self.add_title(title, body, - head_contents=self.head_contents, + head_contents=head_contents, body_attribs={'onload': on_load}), doctype=self.html_dtd(), status=status) |