Skip to content

Commit

Permalink
- Proxy: include "DELETE" operation also when checking for Auth headers
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Nov 15, 2018
1 parent 243912c commit ecfa9d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/proxy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ def proxy(request, url=None, response_callback=None,
headers['Authorization'] = auth
elif access_token:
# TODO: Bearer is currently cutted of by Djano / GeoServer
if request.method in ("POST", "PUT"):
if request.method in ("POST", "PUT", "DELETE"):
headers['Authorization'] = 'Bearer %s' % access_token
if access_token and 'access_token' not in locator:
if 'access_token' not in locator:
query_separator = '&' if '?' in locator else '?'
locator = ('%s%saccess_token=%s' %
(locator, query_separator, access_token))
Expand Down

0 comments on commit ecfa9d1

Please sign in to comment.