make secrets removed from source
This commit is contained in:
parent
88171b8678
commit
a1b8e032e9
@ -3,13 +3,13 @@ import json
|
|||||||
|
|
||||||
from flasktrack.appendbase import Appendbase
|
from flasktrack.appendbase import Appendbase
|
||||||
|
|
||||||
submit_secret = "test"
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
app.config.from_envvar("FLASKTRACK_CREDENTIAL_LOCATION")
|
||||||
base = Appendbase.from_file("base.json")
|
base = Appendbase.from_file("base.json")
|
||||||
|
|
||||||
@app.route('/<secret>/submit', methods=[ "POST"])
|
@app.route('/<secret>/submit', methods=[ "POST"])
|
||||||
def handle_new_data(secret):
|
def handle_new_data(secret):
|
||||||
if secret != submit_secret:
|
if secret != app.config["SUBMIT_SECRET"]:
|
||||||
return ''
|
return ''
|
||||||
print(request.form)
|
print(request.form)
|
||||||
base.append(request.form.to_dict())
|
base.append(request.form.to_dict())
|
||||||
@ -19,7 +19,7 @@ def handle_new_data(secret):
|
|||||||
|
|
||||||
@app.route('/<secret>/view')
|
@app.route('/<secret>/view')
|
||||||
def return_monitor_page(secret):
|
def return_monitor_page(secret):
|
||||||
if secret != submit_secret:
|
if secret != app.config["SUBMIT_SECRET"]:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
data_js = "let location_data = " + json.dumps(base.stuff) + ";"
|
data_js = "let location_data = " + json.dumps(base.stuff) + ";"
|
||||||
|
Loading…
Reference in New Issue
Block a user