Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #82 from hericlesme/feature/env-auth
Browse files Browse the repository at this point in the history
Env auth
  • Loading branch information
matheuscmelo committed Nov 17, 2019
2 parents 60e2dd1 + 2fc7170 commit 3cc064a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cast/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ def main():
print(__version__)
sys.exit(0)

app.config["passwd"] = args.password
env_pass = os.getenv("PASSWORD")
if env_pass is not None:
app.config["passwd"] = env_pass
else:
app.config["passwd"] = args.password

app.config["cmd"] = [args.command] + shlex.split(args.cmd_args)
print("serving on http://0.0.0.0:{}".format(args.port))
socketio.run(app, host="0.0.0.0", debug=args.debug, port=args.port)
Expand Down

0 comments on commit 3cc064a

Please sign in to comment.