diff --git a/config.py b/config.py index 092a222..e0a085c 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,11 @@ +from datetime import timedelta class Config: MONGO_URI = 'mongodb://localhost:27017/mapDB' UPLOAD_FOLDER = 'uploads' SECRET_KEY = 'supersecretkey' ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'} LOGIN_URL = '/thelogin' + REMEMBER_COOKIE_DURATION = timedelta(days=7) # Adjust as needed + REMEMBER_COOKIE_HTTPONLY = True + REMEMBER_COOKIE_SECURE = True # Set to True if using HTTPS + SESSION_COOKIE_SAMESITE = 'Lax' \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index 5c609b5..637c45b 100644 --- a/templates/login.html +++ b/templates/login.html @@ -39,14 +39,14 @@ {% endif %}
{% endblock %} \ No newline at end of file