Skip to content

Commit

Permalink
Root View | URL to have correct HOST scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Nov 7, 2023
1 parent db68f3d commit 4163452
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def destroy(self, request, *args, **kwargs): # pylint: disable=unused-argument
return response.Response(status=status.HTTP_204_NO_CONTENT)

def get_host_url(self):
return self.request.META['wsgi.url_scheme'] + '://' + self.request.get_host()
scheme = self.request.META['wsgi.url_scheme']
if settings.ENV != 'development':
scheme += 's'
return scheme + '://' + self.request.get_host()

def filter_queryset(self, queryset=None):
if self.is_searchable and self.should_perform_es_search():
Expand Down

0 comments on commit 4163452

Please sign in to comment.