middleware: split domain from port
This commit is contained in:
parent
c56a999b92
commit
c0ac563d40
|
@ -35,7 +35,7 @@ class CUTMiddleware(object):
|
||||||
url = next_url or request.GET.get('redirect_uri')
|
url = next_url or request.GET.get('redirect_uri')
|
||||||
netloc = urlparse.urlparse(url).netloc
|
netloc = urlparse.urlparse(url).netloc
|
||||||
if netloc:
|
if netloc:
|
||||||
domain = netloc.split(':')[-1]
|
domain = netloc.split(':')[0]
|
||||||
|
|
||||||
if hasattr(request, 'session'):
|
if hasattr(request, 'session'):
|
||||||
if not domain:
|
if not domain:
|
||||||
|
|
Loading…
Reference in New Issue