Skip to content

Commit 2539459

Browse files
committed
fix: secure Flask defaults and add examples/requirements.txt
1 parent 61d6c6e commit 2539459

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

examples/flask_microservice.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ def _print_usage():
268268

269269
def main() -> None:
270270
_print_usage()
271-
app.run(host="0.0.0.0", port=5000, debug=True)
271+
app.run(
272+
host="127.0.0.1",
273+
port=5000,
274+
debug=os.environ.get("FLASK_DEBUG") == "1",
275+
)
272276

273277

274278
if __name__ == "__main__":

examples/requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Core
2+
llm-bridge
3+
4+
# Web framework
5+
flask>=3.0
6+
7+
# Optional: remote LLM providers
8+
# llm-bridge[openai]

0 commit comments

Comments
 (0)