Compare commits

..

2 Commits

2 changed files with 9 additions and 5 deletions

View File

@ -28,7 +28,7 @@ HRSS is an application that allows you to transform any website into a RSS feed.
[Because we all love demos.](https://hrss.hipstercat.fr) [Because we all love demos.](https://hrss.hipstercat.fr)
# Installation # Installation (native)
1. Make sure you have Python3 installed and virtualenv. 1. Make sure you have Python3 installed and virtualenv.
2. Clone this repo for unstable branch, or download [latest release](https://hipstercat.fr/gogs/hipstercat/hrss/releases). 2. Clone this repo for unstable branch, or download [latest release](https://hipstercat.fr/gogs/hipstercat/hrss/releases).
@ -37,3 +37,6 @@ HRSS is an application that allows you to transform any website into a RSS feed.
5. `python3 manage.py migrate` to apply latest DB migrations (and create the H2 database file). 5. `python3 manage.py migrate` to apply latest DB migrations (and create the H2 database file).
6. `python3 manage.py runserver` to run the integrated webserver (not suitable for production use - even though you should not use HRSS in a production environnement at all until it is considered stable anyway). Use uWSGI to run it in a production environnement. 6. `python3 manage.py runserver` to run the integrated webserver (not suitable for production use - even though you should not use HRSS in a production environnement at all until it is considered stable anyway). Use uWSGI to run it in a production environnement.
# Installation (Docker)
Use https://github.com/kmlucy/docker-hrss nicely made by [kmlucy](https://github.com/kmlucy).

View File

@ -7,9 +7,10 @@ def BASE_URL(request):
else: else:
scheme = 'http://' scheme = 'http://'
fullhost = request.get_host() fullhost = request.get_host()
port = fullhost.split(":")[1] host = fullhost.split(":")[0]
port = request.get_port()
if port == 80 or port == 443: if port == 80 or port == 443:
base = fullhost.split(":")[0] base = host
else: else:
base = fullhost base = host+":"+port
return {'BASE_URL': scheme + base, } return {'BASE_URL': scheme + base, }