Skip to content

Commit

Permalink
Allow client server name (host), useful for proxied apps
Browse files Browse the repository at this point in the history
  • Loading branch information
manelclos committed Jan 29, 2015
1 parent b2f25b3 commit 4f570c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_cas/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def _fix_encoding(x):
def _service(request):
""" Returns service host URL as derived from request """

return ('http://', 'https://')[request.is_secure()] + request.get_host()
host = getattr(settings, 'CAS_CLIENT_HOST', request.get_host())

return ('http://', 'https://')[request.is_secure()] + host


def _service_url(request, redirect_to):
Expand Down

0 comments on commit 4f570c5

Please sign in to comment.