This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Diagnostics; | |
// Redacted after reading : https://andrewlock.net/deploying-asp-net-core-applications-to-kubernetes-part-6-adding-health-checks-with-liveness-readiness-and-startup-probes/#the-three-kinds-of-probe-liveness-readiness-and-startup-probes | |
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddHealthChecks() | |
.AddCheck("Startup", () => HealthCheckResult.Healthy("Startup is done!"), tags: new[] { "startup" }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
using System.Text; | |
// Clé de chiffrement | |
string secretKey = "S4a5Qy@pPv2Di2jz^*WMrxZM6@X5za/.ss24x"; | |
// Vecteur d'initialisation du chiffrement | |
string secretIv = "i6qwQgZS&Q@CfPfb/.P2E"; | |
// Transformation des secrets en tableau d'octets en vu de la signé numériquement via le mécanisme SHA256 | |
byte[] hashKey = SHA256.HashData(Encoding.ASCII.GetBytes(secretKey)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Babylon.FunctionMiddleware; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
[assembly: WebJobsStartup(typeof(Startup))] | |
namespace Babylon.FunctionMiddleware | |
{ | |
public class Startup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection.Extensions; | |
using System; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Threading.Tasks; | |
namespace Babylon.FunctionMiddleware |