Skip to content
Snippets Groups Projects
Commit a928abcb authored by Jan Hartig's avatar Jan Hartig
Browse files

Get URL from environment variable

parent b1ccf69a
No related branches found
No related tags found
1 merge request!16Get URL from environment variable
Pipeline #15120 passed
......@@ -17,8 +17,9 @@ services:
- 8000:8000
environment:
- TZ=Europe/Berlin
- SANIC_JITSI_APP_ID=
- SANIC_JITSI_APP_SECRET=
- SANIC_JITSI_PUBLIC_URL=vc.ptb.de
- SANIC_JITSI_APP_ID=MY_APP_ID
- SANIC_JITSI_APP_SECRET=MY_VERY_SECURE_SECRET
- SANIC_TOKEN_VALID_FOR=15
volumes:
- /path/to/serial2room.json:/data/serial2room.json:ro
......
......@@ -15,6 +15,7 @@ app = Sanic(__name__)
''' Config ###
Set via environment variable
SANIC_JITSI_PUBLIC_URL: vc.ptb.de
SANIC_JITSI_APP_ID
SANIC_JITSI_APP_SECRET: Jitsi App Secret
SANIC_TOKEN_VALID_FOR: Time in seconds generated JWT will be valid for
......@@ -91,7 +92,7 @@ def gen_jwt(room):
claims = json.dumps({
"context": {}, # Setting name and email here leads to auth failure
"iss": app.config.JITSI_APP_ID,
"sub": 'vc.ptb.de',
"sub": app.config.JITSI_PUBLIC_URL,
"iat": now,
"nbf": now,
"exp": now + app.config.TOKEN_VALID_FOR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment