From 3eeae59bb6343cedae68985d17cc41413c020d5f Mon Sep 17 00:00:00 2001 From: Daniel Dourvaris Date: Mon, 8 Aug 2016 18:12:55 +0300 Subject: [PATCH] static: use static_path instead of static_url to account for http vs https --- rhodecode/config/middleware.py | 2 +- rhodecode/lib/helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py index 83da14aa..4984f6b6 100644 --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -319,7 +319,7 @@ def includeme_first(config): # redirect automatic browser favicon.ico requests to correct place def favicon_redirect(context, request): return redirect( - request.static_url('rhodecode:public/images/favicon.ico')) + request.static_path('rhodecode:public/images/favicon.ico')) config.add_view(favicon_redirect, route_name='favicon') config.add_route('favicon', '/favicon.ico') diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py index 069956d1..44bb46df 100644 --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -121,7 +121,7 @@ def asset(path, ver=None): query = {} if ver: query = {'ver': ver} - return request.static_url( + return request.static_path( 'rhodecode:public/{}'.format(path), _query=query)