From ce5b5ebe2535f00a694499006674d623ec45b798 Mon Sep 17 00:00:00 2001 From: Daniel Dourvaris Date: Wed, 10 Aug 2016 17:56:10 +0300 Subject: [PATCH] assets: use pyramid redirect instead of pylons for favion.ico route --- rhodecode/config/middleware.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py index 7e1f29dd..b440c5ab 100644 --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -31,8 +31,7 @@ from pyramid.authorization import ACLAuthorizationPolicy from pyramid.config import Configurator from pyramid.settings import asbool, aslist from pyramid.wsgi import wsgiapp -from pyramid.httpexceptions import HTTPError, HTTPInternalServerError -from pylons.controllers.util import redirect +from pyramid.httpexceptions import HTTPError, HTTPInternalServerError, HTTPFound from pyramid.events import ApplicationCreated import pyramid.httpexceptions as httpexceptions from pyramid.renderers import render_to_response @@ -339,7 +338,7 @@ def includeme(config): def includeme_first(config): # redirect automatic browser favicon.ico requests to correct place def favicon_redirect(context, request): - return redirect( + return HTTPFound( request.static_path('rhodecode:public/images/favicon.ico')) config.add_view(favicon_redirect, route_name='favicon')