diff --git a/client/package-lock.json b/client/package-lock.json index 0060c61a..f5805310 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -19072,23 +19072,6 @@ } } }, - "node_modules/tailwindcss/node_modules/yaml": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, "node_modules/tapable": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9ae2baa6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "Smart-Health-Predictive", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/server/alembic/env.py b/server/alembic/env.py index 25e481dd..bc0f866c 100644 --- a/server/alembic/env.py +++ b/server/alembic/env.py @@ -80,11 +80,14 @@ def run_migrations_online() -> None: # Get the absolute path to the CA certificate cert_path = os.path.join(os.path.dirname(__file__), '..', 'certs', 'DigiCertGlobalRootCA.crt.pem') + connect_args = {} + + if os.getenv("MYSQL_SSL", "false").lower() == "true": + connect_args["ssl_ca"] = cert_path + connectable = create_engine( url, - connect_args={ - 'ssl_ca': cert_path # Path to CA certificate - } + connect_args=connect_args ) with connectable.connect() as connection: diff --git a/server/prediction_models/model_cardio_h.joblib b/server/prediction_models/model_cardio_h.joblib index f6a29fd9..f7df0d93 100644 Binary files a/server/prediction_models/model_cardio_h.joblib and b/server/prediction_models/model_cardio_h.joblib differ diff --git a/server/prediction_models/model_diabetes_h.joblib b/server/prediction_models/model_diabetes_h.joblib index ac75cd33..74914155 100644 Binary files a/server/prediction_models/model_diabetes_h.joblib and b/server/prediction_models/model_diabetes_h.joblib differ diff --git a/server/prediction_models/model_stroke_h.joblib b/server/prediction_models/model_stroke_h.joblib index 75a073e2..86526db2 100644 Binary files a/server/prediction_models/model_stroke_h.joblib and b/server/prediction_models/model_stroke_h.joblib differ diff --git a/server/utils/database.py b/server/utils/database.py index 15a9b40b..7cd4193d 100644 --- a/server/utils/database.py +++ b/server/utils/database.py @@ -18,12 +18,16 @@ # Get the absolute path to the CA certificate cert_path = os.path.join(os.path.dirname(__file__), '..', 'certs', 'DigiCertGlobalRootCA.crt.pem') -# Create the database connection manager with SSL enabled (for Azure MySQL) + +connect_args = {} + +# Only enable SSL if explicitly requested +if os.getenv("MYSQL_SSL", "false").lower() == "true": + connect_args["ssl_ca"] = cert_path + engine = create_engine( DATABASE_URL, - connect_args={ - 'ssl_ca': cert_path # Path to CA certificate - } + connect_args=connect_args ) session_local = sessionmaker(autocommit=False, bind=engine)