Skip to content

Commit

Permalink
Merge pull request #3776 from PacificCommunity/fix-slow-login
Browse files Browse the repository at this point in the history
fix slow login/logout on certain circumstances
  • Loading branch information
Alessio Fabiani authored Apr 24, 2018
2 parents dee03ba + def7df1 commit 8a7818c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geonode/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ def do_login(sender, user, request, **kwargs):
token = u.hex

# Do GeoServer Login
url = "%s%s?access_token=%s" % (settings.OGC_SERVER['default']['PUBLIC_LOCATION'],
url = "%s%s&access_token=%s" % (settings.OGC_SERVER['default']['LOCATION'],
'ows?service=wms&version=1.3.0&request=GetCapabilities',
token)

Expand Down Expand Up @@ -1437,14 +1437,14 @@ def do_logout(sender, user, request, **kwargs):
access_token = None

if access_token:
url = "%s%s?access_token=%s" % (settings.OGC_SERVER['default']['PUBLIC_LOCATION'],
url = "%s%s?access_token=%s" % (settings.OGC_SERVER['default']['LOCATION'],
settings.OGC_SERVER['default']['LOGOUT_ENDPOINT'],
access_token)
header_params = {
"Authorization": ("Bearer %s" % access_token)
}
else:
url = "%s%s" % (settings.OGC_SERVER['default']['PUBLIC_LOCATION'],
url = "%s%s" % (settings.OGC_SERVER['default']['LOCATION'],
settings.OGC_SERVER['default']['LOGOUT_ENDPOINT'])

param = {}
Expand Down

0 comments on commit 8a7818c

Please sign in to comment.