Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowed hosts setting #39

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

ilesoft
Copy link
Contributor

@ilesoft ilesoft commented Nov 21, 2023

Tälläinen asetus tosiaan pitäis olla kun pelataan Django 1.5:n kanssa.
Dokumentaatio: https://docs.djangoproject.com/en/4.2/releases/1.5/#allowed-hosts-required-in-production

Jos tää pitäis asettaa jollain muulla tavalla niin saa ehdottaa.

Mikäli tuota ei ollut asetettu niin palvelu oireili:

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
    self.write(data)
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 217, in write
    self._write(data)
  File "/usr/lib/python2.7/socket.py", line 328, in write
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 657, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 716, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 283, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

@ilesoft
Copy link
Contributor Author

ilesoft commented Nov 25, 2023

Ootellaan tota PR:ää #40 niin saadaan testit ajettua ennen mergeä

@ilesoft ilesoft marked this pull request as draft November 25, 2023 10:58
Django 1.5 required ALLOWED_HOSTS to be set in production environment.
See: https://docs.djangoproject.com/en/4.2/releases/1.5/#allowed-hosts-required-in-production
@ilesoft ilesoft force-pushed the allowed-hosts-setting branch from d1616ab to 147153e Compare November 26, 2023 12:27
@ilesoft ilesoft marked this pull request as ready for review November 26, 2023 15:34
@ZeiP ZeiP merged commit 7f3639e into partio-scout:develop Nov 27, 2023
1 check passed
@ilesoft ilesoft deleted the allowed-hosts-setting branch November 27, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants