1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-28 15:22:47 +02:00

Fix hostname

This commit is contained in:
Alexandre Iooss
2020-09-14 13:52:13 +02:00
parent 73bf43afc5
commit 4b5c5d282e
8 changed files with 16 additions and 16 deletions

View File

@ -15,13 +15,9 @@ def viewer(path):
"""Show stream that match this path"""
return render_template('viewer.html', path=path)
@app.route('/auth', methods=['POST'])
@app.route('/app/auth', methods=['POST'])
def auth():
"""Authentication on stream start"""
# Limit to NGINX auth
if request.remote_addr != '127.0.0.1':
return "Permission denied", 403
name = request.form.get('name')
password = request.form.get('pass')

View File

@ -8,4 +8,5 @@ LDAP_USER_DN = os.environ.get('LDAP_USER_DN') or "cn=users,dc=example,dc=com"
# Web page
SITE_NAME = os.environ.get('SITE_NAME') or "Ghostream"
SITE_HOSTNAME = os.environ.get('SITE_HOSTNAME') or "localhost"
FAVICON = os.environ.get('FAVICON') or "/favicon.ico"

View File

@ -23,7 +23,7 @@
<ul>
<li>
<b>Serveur :</b>
<code>rtmps://{{ request.remote_addr }}:1935/app</code>,
<code>rtmps://{{ config.SITE_HOSTNAME }}:1935/app</code>,
</li>
<li>
<b>Clé de stream :</b>
@ -43,7 +43,7 @@
<p>
Votre stream sera alors disponible sur
<code>https://{{ request.remote_addr }}/IDENTIFIANT</code>.
<code>https://{{ config.SITE_HOSTNAME }}/IDENTIFIANT</code>.
</p>
<h3>Avec FFmpeg</h3>
@ -51,7 +51,7 @@
<code>
ffmpeg -re -i mavideo.webm -vcodec libx264 -vprofile baseline
-acodec aac -strict -2 -f flv
rtmps://{{ request.remote_addr }}:1935/app/IDENTIFIANT?pass=MOT_DE_PASSE
rtmps://{{ config.SITE_HOSTNAME }}:1935/app/IDENTIFIANT?pass=MOT_DE_PASSE
</code>
</p>

View File

@ -14,7 +14,7 @@
<path fill-rule="evenodd" d="M1.5 13A1.5 1.5 0 0 0 3 14.5h8a1.5 1.5 0 0 0 1.5-1.5V9a.5.5 0 0 0-1 0v4a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 0 0-1H3A1.5 1.5 0 0 0 1.5 5v8zm7-11a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V2.5H9a.5.5 0 0 1-.5-.5z"/>
<path fill-rule="evenodd" d="M14.354 1.646a.5.5 0 0 1 0 .708l-8 8a.5.5 0 0 1-.708-.708l8-8a.5.5 0 0 1 .708 0z"/>
</svg>
<code>rtmps://{{ request.remote_addr }}:1935/app/{{ path }}</code>
<code>rtmps://{{ config.SITE_HOSTNAME }}:1935/app/{{ path }}</code>
<a href="#" id="chatToggle" title="Cacher/Afficher le chat">»</a>
</p>
</div>
@ -47,7 +47,7 @@ player = OvenPlayer.create("player", {
expandFullScreenUI: true,
sources: [
{
"file": "wss://{{ request.remote_addr }}/app/{{ path }}",
"file": "wss://{{ config.SITE_HOSTNAME }}/app/{{ path }}",
"type": "webrtc",
"label": "WebRTC Source"
}