Skip to content

Commit 1ffd81a

Browse files
committed
Add security.txt info route
1 parent a63cf15 commit 1ffd81a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,19 @@ def models_list():
2121
def model_rf_commands(brand, model):
2222
return jsonify(get_device_commands(brand=brand, model=model))
2323

24+
25+
# Get security help info
26+
@app.route('/.well-known/security.txt')
27+
def security_info():
28+
return app.send_static_file('.well-known/security.txt')
29+
30+
2431
# Get PORT from env.
2532
PORT = os.getenv("PORT")
2633
if not PORT:
2734
PORT = 5000
2835
else:
2936
PORT = int(PORT)
37+
3038
if __name__ == '__main__':
3139
app.run(port=PORT)

static/.well-known/security.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This server build by an open-source project at https://github.com/casanet/rf-commands-repo .
2+
If you would like to report a security issue in the code-base please open an issue in the repository,
3+
or contact me directly via my profile https://github.com/haimkastner .
4+
Thanks!

0 commit comments

Comments
 (0)