higlass / higlass-docker

Builds a docker container wrapping higlass-server and higlass-client in nginx
MIT License
32 stars 14 forks source link

Parameterize allowed host names #131

Closed nvictus closed 7 years ago

nvictus commented 7 years ago

The following Django setting whitelists which host names are allowed in production mode: https://github.com/hms-dbmi/higlass-server/blob/master/higlass_server/settings.py#L36

If someone wants to expose a higlass server on a public IP, it needs to be added to the whitelist or set ALLOWED_HOSTS=['*']. Otherwise, API calls will yield 400: Bad Request.

pkerpedjiev commented 7 years ago

Updated higlass-server to check for the SITE_URL environment variable and add its contents to the ALLOWED_HOSTS. Docker container should be run with the -e SITE_URL=somesite.com option:

docker run --detach \
           --publish 8989:80 \
           --volume ~/hg-data:/data \
           --volume ~/hg-tmp:/tmp \
           --name higlass-container \
          -e SITE_URL="somesite.com" \
           gehlenborglab/higlass
pkerpedjiev commented 7 years ago

Fixed in v0.0.22.