Update app.py
Browse files
app.py
CHANGED
|
@@ -15,13 +15,11 @@ print("Salesforce connection established.")
|
|
| 15 |
# Set the secret key to handle sessions securely
|
| 16 |
app.secret_key = os.getenv("SECRET_KEY", "sSSjyhInIsUohKpG8sHzty2q") # Replace with a secure key
|
| 17 |
|
| 18 |
-
app.config["SESSION_TYPE"] = "filesystem"
|
| 19 |
-
app.config["SESSION_COOKIE_NAME"] = "biryanihub_session"
|
| 20 |
app.config["SESSION_COOKIE_PATH"] = "/" # Available across all routes
|
| 21 |
-
app.config["SESSION_COOKIE_DOMAIN"] = None #
|
| 22 |
-
app.config["SESSION_COOKIE_SECURE"] = False # Set to True if
|
| 23 |
-
app.config["SESSION_COOKIE_HTTPONLY"] = True # Prevent
|
| 24 |
-
app.config["SESSION_PERMANENT"] = False
|
| 25 |
|
| 26 |
|
| 27 |
# Ensure secure session handling for environments like Hugging Face
|
|
|
|
| 15 |
# Set the secret key to handle sessions securely
|
| 16 |
app.secret_key = os.getenv("SECRET_KEY", "sSSjyhInIsUohKpG8sHzty2q") # Replace with a secure key
|
| 17 |
|
|
|
|
|
|
|
| 18 |
app.config["SESSION_COOKIE_PATH"] = "/" # Available across all routes
|
| 19 |
+
app.config["SESSION_COOKIE_DOMAIN"] = None # Let the browser determine the domain
|
| 20 |
+
app.config["SESSION_COOKIE_SECURE"] = False # Set to True if HTTPS
|
| 21 |
+
app.config["SESSION_COOKIE_HTTPONLY"] = True # Prevent JavaScript access
|
| 22 |
+
app.config["SESSION_PERMANENT"] = False # Do not use permanent sessions
|
| 23 |
|
| 24 |
|
| 25 |
# Ensure secure session handling for environments like Hugging Face
|