partio-scout / kipa

Kipa eli Kisapalvelu on partiotaitokilpailujen tuloslaskentaan tehty selainpohjainen ohjelmisto.
http://partio-scout.github.io/kipa/
GNU General Public License v3.0
19 stars 8 forks source link

Add allowed hosts setting #39

Closed ilesoft closed 11 months ago

ilesoft commented 11 months ago

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 commented 11 months ago

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