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)
# Installation
# Installation (native)
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).
@ -36,4 +36,7 @@ HRSS is an application that allows you to transform any website into a RSS feed.
4. `bin/activate && pip3 install -r requirements.txt` to install dependencies.
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.
# 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:
scheme = 'http://'
fullhost = request.get_host()
port = fullhost.split(":")[1]
host = fullhost.split(":")[0]
port = request.get_port()
if port == 80 or port == 443:
base = fullhost.split(":")[0]
base = host
else:
base = fullhost
base = host+":"+port
return {'BASE_URL': scheme + base, }