Skip to content

Commit 16944d5

Browse files
Merge pull request #99 from Geode-solutions/fix/host
Fix/host
2 parents bfd5e12 + 9bdc1ba commit 16944d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
else:
2323
app.config.from_object(app_config.DevConfig)
2424

25+
DEFAULT_HOST = app.config.get("DEFAULT_HOST")
2526
PORT = int(app.config.get("DEFAULT_PORT"))
2627
ORIGINS = app.config.get("ORIGINS")
2728
SSL = app.config.get("SSL")
@@ -50,4 +51,4 @@ def return_error():
5051
# ''' Main '''
5152
if __name__ == "__main__":
5253
print(f"Python is running in {FLASK_DEBUG} mode")
53-
app.run(debug=FLASK_DEBUG, host="0.0.0.0", port=PORT, ssl_context=SSL)
54+
app.run(debug=FLASK_DEBUG, host=DEFAULT_HOST, port=PORT, ssl_context=SSL)

src/opengeodeweb_back/app_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
class Config(object):
1010
FLASK_DEBUG = os.environ.get("FLASK_DEBUG", default=False)
11+
DEFAULT_HOST = "localhost"
1112
DEFAULT_PORT = "5000"
1213
CORS_HEADERS = "Content-Type"
1314
UPLOAD_FOLDER = "./uploads"

0 commit comments

Comments
 (0)