prepare 0.1.27

This commit is contained in:
Jens Langhammer 2019-03-22 14:51:09 +01:00
parent c679f0a67c
commit 2739442d4a
2 changed files with 12 additions and 3 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
passbook (0.1.27) stable; urgency=medium
* bump version: 0.1.25-beta -> 0.1.26-beta
* fix broken app_gw
-- Jens Langhammer <jens.langhammer@beryju.org> Fri, 22 Mar 2019 13:50:31 +0000
passbook (0.1.26) stable; urgency=medium
* bump version: 0.1.24-beta -> 0.1.25-beta

View File

@ -7,6 +7,7 @@ import certifi
import urllib3
from django.core.cache import cache
from django.utils.http import urlencode
from django.views.generic import RedirectView
from revproxy.exceptions import InvalidUpstream
from revproxy.response import get_django_response
from revproxy.utils import encode_items, normalize_request_headers
@ -15,6 +16,7 @@ from passbook.app_gw.models import ApplicationGatewayProvider
from passbook.app_gw.rewrite import Rewriter
from passbook.core.models import Application
from passbook.core.policies import PolicyEngine
from passbook.lib.config import CONFIG
IGNORED_HOSTNAMES_KEY = 'passbook_app_gw_ignored'
LOGGER = getLogger(__name__)
@ -209,9 +211,9 @@ class ApplicationGatewayMiddleware:
def dispatch(self, request):
"""Build proxied request and pass to upstream"""
# if not self.check_permission():
# to_url = 'https://%s/?next=%s' % (CONFIG.get('domains')[0], request.get_full_path())
# return RedirectView.as_view(url=to_url)(request)
if not self.check_permission():
to_url = 'https://%s/?next=%s' % (CONFIG.get('domains')[0], request.get_full_path())
return RedirectView.as_view(url=to_url)(request)
self._request_headers = self.get_request_headers()