Key en json directa reversión.
All checks were successful
Build and Deploy / remote-build-and-deploy (push) Successful in 16m42s
All checks were successful
Build and Deploy / remote-build-and-deploy (push) Successful in 16m42s
This commit is contained in:
@@ -63,10 +63,6 @@ jobs:
|
||||
cd /opt/gestion-integral
|
||||
# Gitea reemplaza los secretos aquí. Es seguro.
|
||||
export DB_SA_PASSWORD='${{ secrets.DB_SA_PASSWORD_SECRET }}'
|
||||
export JWTSETTINGS__KEY= '${{ secrets.JWTSETTINGS__KEY }}'
|
||||
|
||||
echo "Verifying environment variables before deploy: JWT Key is set to '${JWTSETTINGS__KEY}'"
|
||||
|
||||
docker compose up -d
|
||||
|
||||
# --- PARTE 4: LIMPIEZA (EN EL HOST) ---
|
||||
|
||||
@@ -98,9 +98,7 @@ var jwtSettings = builder.Configuration.GetSection("Jwt");
|
||||
|
||||
// Le decimos que busque la clave JWT en la raíz de la configuración (donde están las variables de entorno).
|
||||
// Si no la encuentra, como respaldo, busca en la sección "Jwt" del appsettings.
|
||||
//var jwtKey = builder.Configuration["JWT_KEY"] ?? jwtSettings["Key"] ?? throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
|
||||
var jwtKey = Environment.GetEnvironmentVariable("JWTSETTINGS__KEY") ?? throw new ArgumentNullException("Jwt:Key", "JWT Key not configured in appsettings.json");
|
||||
//Environment.GetEnvironmentVariable("JWT_KEY");
|
||||
var jwtKey = builder.Configuration["JWT_KEY"] ?? jwtSettings["Key"] ?? throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
|
||||
|
||||
var keyBytes = Encoding.ASCII.GetBytes(jwtKey);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
}
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "badb1a38d221c9e23bcf70958840ca7f5a5dc54f2047dadf7ce45b578b5bc3e2",
|
||||
"Issuer": "GestionIntegralApi",
|
||||
"Audience": "GestionIntegralClient",
|
||||
"DurationInHours": 8
|
||||
|
||||
Reference in New Issue
Block a user