[GeoNode-devel] Using "/" as SITEURL

Olivier Dalang olivier.dalang at gmail.com
Thu Mar 15 19:49:09 PDT 2018


Hi !

When serving one Geonode instance using different host names or schemes
(e.g. LAN/WAN ip, HTTP/HTTPS, multiple domain names), one would have to use
"/" as SITEURL, so that absolute urls refer to the same scheme/domain.

When doing so, I get the following exception when creating layers
programmatically or running the updatelayers command
:
  File "/usr/local/lib/python2.7/site-packages/geonode/base/models.py",
line 940, in resourcebase_post_save
    if urlsplit(settings.SITEURL).hostname not in link.url:

It seems it is assumed that SITEURL is an absolute URL including scheme and
host name.

The bug would be very easy to fix, but since it seems to be assumed SITEURL
must be absolute, I was wondering if there may be some side effects in
using "/" as SITEURL ?

If there are no side-effects, wouldn't it be good to have "/" as a default
instead of " http://localhost:8000/" ?

Thanks !

Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20180316/a38e7b36/attachment.html>


More information about the geonode-devel mailing list