Open
Description
I have a context processor that calls request.get_host()
in my project. Calling the update_index
management command results in the following exception:
django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: '*'. The domain name provided is not valid according to RFC 1034/1035.
[ERROR/MainProcess] Error updating cms using default
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/haystack/management/commands/update_index.py", line 230, in handle
self.update_backend(label, using)
File "/usr/local/lib/python3.7/site-packages/haystack/management/commands/update_index.py", line 276, in update_backend
last_max_pk=max_pk)
File "/usr/local/lib/python3.7/site-packages/haystack/management/commands/update_index.py", line 97, in do_update
backend.update(index, current_qs, commit=commit)
File "/usr/local/lib/python3.7/site-packages/haystack/backends/elasticsearch_backend.py", line 168, in update
prepped_data = index.full_prepare(obj)
File "/usr/local/lib/python3.7/site-packages/haystack/indexes.py", line 208, in full_prepare
self.prepared_data = self.prepare(obj)
File "/usr/local/lib/python3.7/site-packages/aldryn_search/base.py", line 45, in prepare
self.prepared_data['text'] = self.get_search_data(obj, current_language, request)
File "/usr/local/lib/python3.7/site-packages/aldryn_search/search_indexes.py", line 118, in get_search_data
plugin_text_content = self.get_plugin_search_text(base_plugin, request)
File "/usr/local/lib/python3.7/site-packages/aldryn_search/search_indexes.py", line 134, in get_plugin_search_text
plugin_content_bits = get_plugin_index_data(base_plugin, request)
File "/usr/local/lib/python3.7/site-packages/aldryn_search/helpers.py", line 79, in get_plugin_index_data
updates.update(processor(context.request))
File "/app/context_processors.py", line 11, in host
return {"host": request.get_host()}
File "/usr/local/lib/python3.7/site-packages/django/http/request.py", line 111, in get_host
raise DisallowedHost(msg)
What is the *
doing in there? I can't find anything in the configuration to change this.
Metadata
Assignees
Labels
No labels
Activity