Merge pull request #43 from ThomasRubini/origin_env

This commit is contained in:
Thomas Rubini 2023-01-15 13:06:04 +01:00 committed by GitHub
commit 9c04b041fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# Common
FLASK_SECRET=""
DISCORD_BOT_TOKEN=""
ORIGIN="https://example.com"
# Database
DB_HOST=""

View File

@ -23,7 +23,10 @@ class TruthSeekerApp(flask.Flask):
self.config["SECRET_KEY"] = os.getenv("FLASK_SECRET")
self.socketio_app = SocketIO(self,cors_allowed_origins=["https://truthinquiry.simailadjalim.fr","http://127.0.0.1:5000"])
self.socketio_app = SocketIO(
self,
cors_allowed_origins=(os.getenv("ORIGIN"), "http://127.0.0.1:5000", "http://localhost:5000")
)
self.discord_bot = discord_bot.DiscordBot()
token = os.getenv("DISCORD_BOT_TOKEN")