Update secret key in Flask app and modify provisioning script to set image flag correctly
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ from bson.objectid import ObjectId
|
|||||||
import user as user_store
|
import user as user_store
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = "ASDfhbsdfseiufhgildsrfrjg874368546987s6e8468f4s"
|
app.secret_key = "ASDfhbsdfseiufhgildsrfrjg874368546987s6e8468f4!?FAUS/&s"
|
||||||
app.config["SESSION_COOKIE_HTTPONLY"] = True
|
app.config["SESSION_COOKIE_HTTPONLY"] = True
|
||||||
app.config["SESSION_COOKIE_SAMESITE"] = "Strict"
|
app.config["SESSION_COOKIE_SAMESITE"] = "Strict"
|
||||||
app.config["SESSION_COOKIE_SECURE"] = os.environ.get("SESSION_COOKIE_SECURE", "0") == "1"
|
app.config["SESSION_COOKIE_SECURE"] = os.environ.get("SESSION_COOKIE_SECURE", "0") == "1"
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ for line in lines:
|
|||||||
|
|
||||||
if not in_app and re.match(r"^\s{2}app:\s*$", line):
|
if not in_app and re.match(r"^\s{2}app:\s*$", line):
|
||||||
in_app = True
|
in_app = True
|
||||||
image_set = False
|
image_set = True
|
||||||
out.append(line)
|
out.append(line)
|
||||||
out.append(f" image: {target_image}\n")
|
out.append(f" image: {target_image}\n")
|
||||||
continue
|
continue
|
||||||
@@ -352,6 +352,8 @@ out = []
|
|||||||
in_nginx = False
|
in_nginx = False
|
||||||
in_ports = False
|
in_ports = False
|
||||||
ports_indent = ""
|
ports_indent = ""
|
||||||
|
in_app = False
|
||||||
|
seen_app_image = False
|
||||||
i = 0
|
i = 0
|
||||||
|
|
||||||
while i < len(lines):
|
while i < len(lines):
|
||||||
@@ -366,6 +368,10 @@ while i < len(lines):
|
|||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if indent == 2 and stripped.endswith(":"):
|
||||||
|
in_app = stripped.startswith("app:")
|
||||||
|
seen_app_image = False
|
||||||
|
|
||||||
if in_nginx and indent == 2 and stripped.endswith(":") and not stripped.startswith("nginx:"):
|
if in_nginx and indent == 2 and stripped.endswith(":") and not stripped.startswith("nginx:"):
|
||||||
in_nginx = False
|
in_nginx = False
|
||||||
in_ports = False
|
in_ports = False
|
||||||
@@ -374,6 +380,12 @@ while i < len(lines):
|
|||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if in_app and indent == 4 and stripped.startswith("image:"):
|
||||||
|
if seen_app_image:
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
seen_app_image = True
|
||||||
|
|
||||||
if in_nginx and stripped.startswith("ports:") and indent == 4:
|
if in_nginx and stripped.startswith("ports:") and indent == 4:
|
||||||
out.append(line)
|
out.append(line)
|
||||||
out.append(" - \"${INVENTAR_HTTP_PORT:-80}:80\"")
|
out.append(" - \"${INVENTAR_HTTP_PORT:-80}:80\"")
|
||||||
|
|||||||
Reference in New Issue
Block a user