Skip to content

Domain and allowed hosts

Mathieu Bridon requested to merge domain-and-allowed-hosts into master

This allows setting the DOMAIN and ALLOWED_HOSTS settings merely by passing the DOMAIN environment variable to the application. The ALLOWED_HOSTS setting is computed from the DOMAIN.

@fheslouin: Once this is merged, ansiblecube needs to be adapted, to add the right DOMAIN= line in /etc/default/ideascube (or any other method of passing environment variables of your choosing).

For example, on Koombooks, you would set:

DOMAIN=koombook.lan

On Ideasbox, you would set:

DOMAIN=ideasbox.lan

On the Colombian boxes:

DOMAIN=bibliotecamovil.lan

If this variable is not set, then all boxes (including the currently deployed ones) default to:

  • DOMAIN: ideascube.lan
  • ALLOWED_HOSTS: ['.ideascube.lan', 'localhost', '127.0.0.1']

This supercedes !911 (closed)

Edited by Mathieu Bridon

Merge request reports