gestione sql obsoleto

This commit is contained in:
LORENZO\pacio 2025-01-30 10:46:44 +01:00
parent 39029f199c
commit 50f7f504e0
3 changed files with 14 additions and 1 deletions

View File

@ -4,6 +4,15 @@ WORKDIR /app
EXPOSE 80
EXPOSE 443
#PER CONNESSIONE A DATABASE MSSQL OBSOLETI
# Install OpenSSL and modify its configuration to allow weaker ciphers and TLSv1
RUN apt-get update && apt-get install -y libssl3 \
&& echo "[system_default_sect]" >> /etc/ssl/openssl.cnf \
&& echo "MinProtocol = TLSv1" >> /etc/ssl/openssl.cnf \
&& echo "CipherString = DEFAULT@SECLEVEL=1" >> /etc/ssl/openssl.cnf \
&& echo "SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_3);" >> /etc/ssl/openssl.cnf \
&& rm -rf /var/lib/apt/lists/*
# Build the application
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src

View File

@ -2,9 +2,13 @@ using ApiAdHoc_Odoo.Data;
using ApiAdHoc_Odoo.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Net;
var builder = WebApplication.CreateBuilder(args);
// Enable legacy TLS protocols (TLS 1.0/1.1)
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
// Add services to the container.
builder.Services.AddControllers();

View File

@ -4,7 +4,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "50000:80" # HTTP
- "50000:8080" # HTTP
- "50001:443" # HTTPS
environment:
ASPNETCORE_ENVIRONMENT: "Production"