Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump System.Drawing.Common from 7.0.0 to 8.0.6 #376

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
7eed588
Update appsettings.json
ponselvamsakthivel-bc Jul 15, 2022
d1f3dc1
Merge branch 'production' into main
ponselvamsakthivel-bc Feb 13, 2023
0fda3d6
Task 5163: Enable Swagger for Notification API
brijeshpatel-bc Apr 17, 2023
994c1ce
Merge pull request #111 from Crown-Commercial-Service/feature/enable-…
ponselvamsakthivel-bc Apr 17, 2023
242eb05
5126 SNYK critical bug in GovNotification repo
jukibaskar-bc Apr 19, 2023
b3fabcd
Merge pull request #113 from Crown-Commercial-Service/feature/5126Sny…
ponselvamsakthivel-bc Apr 19, 2023
deedff5
Merge pull request #114 from Crown-Commercial-Service/main
ponselvamsakthivel-bc Apr 19, 2023
e8d6aa6
monthly scan added
boobalanmurugan-bc May 3, 2023
d9b32a8
monthly scan added
boobalanmurugan-bc May 3, 2023
c145e4b
monthly scan added
boobalanmurugan-bc May 3, 2023
2440416
monthly scan added
boobalanmurugan-bc May 3, 2023
9f3f84f
monthly scan added
boobalanmurugan-bc May 3, 2023
37dc0dd
configuration added for monthly scan
ponselvamsakthivel-bc May 4, 2023
01e7bb4
configuration added for monthly scan
ponselvamsakthivel-bc May 4, 2023
278986f
Update monthly-scan.yml
boobalanmurugan-bc May 4, 2023
6ebe839
Task 5590: Dependabot Issue - Server side request forgery in SwaggerUI
brijeshpatel-bc May 10, 2023
4846b34
Merge pull request #115 from Crown-Commercial-Service/feature/lib-upd…
ponselvamsakthivel-bc May 10, 2023
877c411
Snyk issue resolved
brijrajsinh-bc May 23, 2023
9cd8f9a
Merge pull request #116 from Crown-Commercial-Service/feature/Task-57…
ponselvamsakthivel-bc May 24, 2023
4c1efe1
Merge pull request #128 from Crown-Commercial-Service/development
boobalanmurugan-bc May 24, 2023
c647273
secrets removed from nuget config
ponselvamsakthivel-bc Jun 1, 2023
64060dc
Merge pull request #134 from Crown-Commercial-Service/fix/remove_nuge…
ponselvamsakthivel-bc Jun 1, 2023
858a572
secret scan added
ponselvamsakthivel-bc Jun 1, 2023
f0aae4b
Fixed-new-email-api
Jun 14, 2023
5262626
ChangesUpdated-new-email-api
Jun 15, 2023
58dd43c
Merge pull request #146 from Crown-Commercial-Service/new-email-api
ponselvamsakthivel-bc Jun 16, 2023
be4ffaa
docker & ecs task definitions added
ponselvamsakthivel-bc Jul 4, 2023
f7910a0
Update nuget.config
ponselvamsakthivel-bc Jul 4, 2023
26f16df
docker & ecs task definitions added
ponselvamsakthivel-bc Jul 4, 2023
6862149
Vcap replace with AWS changes
brijrajsinh-bc Jul 4, 2023
c4abe3e
Aws docker image useurl change
brijrajsinh-bc Jul 7, 2023
57ac9cc
AWS startup url code improvement
brijrajsinh-bc Jul 7, 2023
ac53ad8
Update notification.json
ponselvamsakthivel-bc Jul 18, 2023
91336e7
Merge pull request #168 from Crown-Commercial-Service/feature/Aws-Vca…
ponselvamsakthivel-bc Jul 20, 2023
5034d76
Fixing existing issues in notification endpoint
jayaramseetharaman-bc Jul 31, 2023
10eeac0
updated return type of sendemailasync and throwing if any exception e…
jayaramseetharaman-bc Aug 1, 2023
7ad05bf
Renamed api route as per ccs review comments
jukibaskar-bc Aug 4, 2023
88b91e0
Small changes
brijeshpatel-bc Aug 7, 2023
9897ec2
Merge pull request #178 from Crown-Commercial-Service/new-email-api
ponselvamsakthivel-bc Aug 7, 2023
e14f626
6531 health check and swagger route changes
brijrajsinh-bc Aug 31, 2023
f8bda31
Merge pull request #199 from Crown-Commercial-Service/feature/6531-he…
ponselvamsakthivel-bc Aug 31, 2023
01da6c4
6531 swagger route change and health end point
brijrajsinh-bc Sep 1, 2023
d2f0cf7
Revert "6531 health check and swagger route changes"
brijrajsinh-bc Sep 1, 2023
4c05c73
Merge pull request #201 from Crown-Commercial-Service/revert-199-feat…
ponselvamsakthivel-bc Sep 1, 2023
ebb37f8
Merge branch 'main' into new-email-api
brijrajsinh-bc Sep 4, 2023
7ca69f3
Undo route changes
brijrajsinh-bc Sep 4, 2023
13d60c8
Merge pull request #203 from Crown-Commercial-Service/Undo-route-changes
ponselvamsakthivel-bc Sep 4, 2023
b8275ca
x-ray implementation
brijrajsinh-bc Nov 1, 2023
011a089
Update notification.json
ponselvamsakthivel-bc Nov 1, 2023
022a511
Console.WriteLine("x-ray is enabled.");
brijrajsinh-bc Nov 2, 2023
0e03ee5
Update notification.Dockerfile
ponselvamsakthivel-bc Nov 14, 2023
9fd1bb3
Update notification.json
ponselvamsakthivel-bc Jan 9, 2024
65a1899
Added- swagger file
Jan 16, 2024
7420c07
Merge pull request #300 from Crown-Commercial-Service/Added-swagger-file
ponselvamsakthivel-bc Jan 16, 2024
40baa61
Merge pull request #302 from Crown-Commercial-Service/p3sprint27
ponselvamsakthivel-bc Feb 9, 2024
1e0ea03
Task 7226: Snyk Alert: Unprotected Storage of Credentials
brijrajsinh-bc Feb 12, 2024
7d9958b
Merge pull request #303 from Crown-Commercial-Service/Task/7226-Snyk-…
RubanPrasath-bc Feb 12, 2024
57cbd82
Task 7250: Snyk: Vulnerable Dependencies - System.Net.Http 4.1.0 (#304)
brijrajsinh-bc Feb 22, 2024
5d4e442
Update notification.json
ponselvamsakthivel-bc Mar 7, 2024
70d2cdf
Task 7270: Code Climate - Too many return statements (#310)
brijrajsinh-bc Mar 8, 2024
94b0bf6
Implemented task 7275 Security enhancement email parameter manipulati…
jukibaskar-bc Mar 12, 2024
77276b8
Adding Logs to test task 7275 (#315)
jukibaskar-bc Mar 13, 2024
0f36111
Merge pull request #317 from Crown-Commercial-Service/p3supportsprint2
ponselvamsakthivel-bc Mar 14, 2024
208e2c8
Bug 7314: Input Validation Enhancement API-Email Parameter Manipulati…
saranyadevi-bc Mar 22, 2024
1de0fed
Task 7364: Snyk: GovUKnotify Version Upgrade changes done. (#366)
madhumathivenkatesan-bc May 16, 2024
7c65eaa
Task 7383: PPG Unit Test Case Improvement changes done. (#374)
madhumathivenkatesan-bc May 27, 2024
aa8b85f
Task 7392: SQL Injection package upgrade changes done. (#380)
jukibaskar-bc Jun 3, 2024
3bcdade
Merge pull request #387 from Crown-Commercial-Service/p3supportsprint9
ponselvamsakthivel-bc Jun 12, 2024
93e8e58
Bump System.Drawing.Common from 7.0.0 to 8.0.6
dependabot[bot] Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/monthly-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Trufflehog Monthly Deep Scan


on:
schedule:
- cron: "0 0 28-31 * *"

#This scan will run on the last day of every month

push:
branches: [main, p3sprint/*, feature/*]
jobs:
trufflehog-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Trufflehog-latest
run: |
pip3 install trufflehog
- name: Run Trufflehog Monthly Deep Scan

#Configure the correct git url of the repo to be scanned
run: |
trufflehog https://github.com/Crown-Commercial-Service/ccs-ppg-notification-api.git --regex --entropy=FALSE

- name: Send email notification
uses:
dawidd6/[email protected]
if: always()

with:
server_address: ${{ secrets.SERVER_ADDRESS }}
server_port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.USER_NAME }}
password: ${{ secrets.PASSWORD }}
subject: Trufflehog Monthly Deep Scan
to: "[email protected],[email protected]"
from: "[email protected]"
body: |

Hi,

The Trufflehog Monthly Deep Scan has completed for "${{ github.repository }}". Please review the results below:

Scan Job URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

Scan Status: **${{ job.status }}**

Thank You.
Brickendon SecOps
64 changes: 64 additions & 0 deletions .github/workflows/secrets-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Git Secrets Scan

on:
schedule:
- cron: "0 0 * * *"
push:
branches: [main, feature/*, p3sprint/*]

jobs:
git-secrets-scan:
name: Git Secrets Scan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install git secrets
run: sudo apt-get update && sudo apt-get install git-secrets -y

- name: Add custom secrets patterns
run: git secrets --add '(\bBEGIN\b).*(PRIVATE KEY\b)'
&& git secrets --add 'AKIA[0-9A-Z]{16}'
&& git secrets --add '^([A-Za-z0-9/+=]{40,})$'
&& git secrets --add '^ghp_[a-zA-Z0-9]{36}'
&& git secrets --add '^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}'
&& git secrets --add '^v[0-9]\\.[0-9a-f]{40}'
&& git secrets --add '[A-Za-z0-9+/]{88}=='
&& git secrets --add '[A-Za-z0-9_-]{32}$'
&& git secrets --add 'conclavesso[0-9a-z-]{84}'
&& git secrets --add '\\b[a-z0-9]{80}\\b'
&& git secrets --add '\\b[A-Z0-9]{50}\\b'
&& git secrets --add '\\b[A-Z0-9]{58}\\b'
&& git secrets --add '^[a-zA-Z0-9_-]{32,64}$'

- name: Run git secrets scan
run: |
git secrets --scan

- name: Send email notification
uses:
dawidd6/[email protected]
if: always()

with:
server_address: ${{ secrets.SERVER_ADDRESS }}
server_port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.USER_NAME }}
password: ${{ secrets.PASSWORD }}
subject: Git Secrets Scan Results
to: "[email protected], [email protected]"
from: "[email protected]"
body: |

Hi,

The Git Secrets scan has completed for "${{ github.repository }}". Please review the results below:

Scan Job URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

Scan Status: **${{ job.status }}**

Thank You.
Brickendon SecOps
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@
</PropertyGroup>

<ItemGroup>
<Content Remove="appsecrets.json" />
<Content Remove="appsecrets.json" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="appsecrets.json" />
<EmbeddedResource Include="appsecrets.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="VaultSharp" Version="1.7.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="VaultSharp" Version="1.7.1" />
<PackageReference Include="AWSXRayRecorder.Core" Version="2.14.0" />
<PackageReference Include="AWSXRayRecorder.Handlers.AspNetCore" Version="2.11.0" />
<PackageReference Include="AWSXRayRecorder.Handlers.AwsSdk" Version="2.12.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Ccs.Ppg.NotificationService\Ccs.Ppg.NotificationService.csproj" />
<ProjectReference Include="..\Ccs.Ppg.Utility.Authorization\Ccs.Ppg.Utility.Authorization.csproj" />
<ProjectReference Include="..\Ccs.Ppg.Utility.Constants\Ccs.Ppg.Utility.Constants.csproj" />
<ProjectReference Include="..\Ccs.Ppg.Utility.Exceptions\Ccs.Ppg.Utility.Exceptions.csproj" />
<ProjectReference Include="..\Ccs.Ppg.Utility.Logging\Ccs.Ppg.Utility.Logging.csproj" />
<ProjectReference Include="..\Ccs.Ppg.Utility.Swagger\Ccs.Ppg.Utility.Swagger.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ namespace Ccs.Ppg.NotificationService.API.Controllers
public class NotificationController : ControllerBase
{
private readonly IMessageProviderService _messageProviderService;
public NotificationController(IMessageProviderService messageProviderService)
private readonly IEmailProviderService _emailProviderService;
public NotificationController(IMessageProviderService messageProviderService, IEmailProviderService emailProviderService)
{
_messageProviderService = messageProviderService;
}
_emailProviderService = emailProviderService;
}
/// <summary>
/// Allows a user to send SMS
/// </summary>
Expand All @@ -39,11 +41,42 @@ public NotificationController(IMessageProviderService messageProviderService)
/// </remarks>

[HttpPost("sms")]
[SwaggerOperation(Tags = new[] { "notification/sms" })]
[SwaggerOperation(Tags = new[] { "Notification - SMS" })]
[ProducesResponseType(typeof(bool), 200)]
public async Task<bool> Post(MessageRequestModel message)
{
return await _messageProviderService.SendMessage(message);
}
}
}

/// <summary>
/// Allows a user to send email
/// </summary>
/// <response code="200">Ok</response>
/// <response code="401">Unauthorised</response>
/// <response code="403">Forbidden</response>
/// <response code="404">Not found</response>
/// <response code="400">Bad request. </response>
/// <remarks>
/// Sample request:
///
/// POST /notification/email
/// {
/// "to": "[email protected]",
/// "templateId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
/// "bodyContent": {
/// "email": "[email protected]",
/// "additionalProp3": "string",
/// "additionalProp3": "string"
/// }
/// }
///
/// </remarks>

[HttpPost("email")]
[SwaggerOperation(Tags = new[] { "Notification - Email" })]
public async Task SendEmailAsync(EmailInfo emailInfo)
{
await _emailProviderService.SendEmailAsync(emailInfo);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public async Task GetSecrets()
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "Message/ApiKey", "Message:ApiKey"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "Message/TemplateId", "Message:TemplateId"));

var dbName = _awsParameterStoreService.FindParameterByName(parameters, path + "ConnectionStrings/Name");
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "Email/ApiKey", "Email:ApiKey"));

var dbName = _awsParameterStoreService.FindParameterByName(parameters, path + "ConnectionStrings/Name");
var dbConnection = _awsParameterStoreService.FindParameterByName(parameters, path + "ConnectionStrings/CcsSso");

if (!string.IsNullOrEmpty(dbName))
Expand All @@ -53,6 +55,22 @@ public async Task GetSecrets()
}

configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "apis/OrganisationUrl", "apis:OrganisationUrl"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "EnableXRay", "EnableXRay"));

configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "WrapperApiSettings/ConfigApiKey", "WrapperApiSettings:ConfigApiKey"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "WrapperApiSettings/ApiGatewayEnabledConfigUrl", "WrapperApiSettings:ApiGatewayEnabledConfigUrl"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "WrapperApiSettings/ApiGatewayDisabledConfigUrl", "WrapperApiSettings:ApiGatewayDisabledConfigUrl"));

configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/EnableValidation", "NotificationValidationConfigurations:EnableValidation"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/SmsMsgLength", "NotificationValidationConfigurations:SmsMsgLength"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/OrgNameLegnth", "NotificationValidationConfigurations:OrgNameLegnth"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/EmailRegex", "NotificationValidationConfigurations:EmailRegex"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/FirstNameLength", "NotificationValidationConfigurations:FirstNameLength"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/LastNameLength", "NotificationValidationConfigurations:LastNameLength"));
configurations.AddRange(_awsParameterStoreService.GetParameterFromCommaSeparated(parameters, path + "NotificationValidationConfigurations/SignInProviders", "NotificationValidationConfigurations:SignInProviders"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/LinkRegex", "NotificationValidationConfigurations:LinkRegex"));
configurations.Add(_awsParameterStoreService.GetParameter(parameters, path + "NotificationValidationConfigurations/CcsMsg", "NotificationValidationConfigurations:CcsMsg"));


foreach (var configuration in configurations)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ public async Task GetSecrets()
Data.Add("Message:TemplateId", messageSettingsVault.TemplateId);
}

if (_secrets.Data.ContainsKey("ConnectionStrings"))
if (_secrets.Data.ContainsKey("Email"))
{
var messageSettingsVault = JsonConvert.DeserializeObject<MessageSettingsVault>(_secrets.Data["Email"].ToString());
Data.Add("Email:ApiKey", messageSettingsVault.ApiKey);
}

if (_secrets.Data.ContainsKey("ConnectionStrings"))
{
var connectionStringsSettingsVault = JsonConvert.DeserializeObject<ConnectionStringsSettingsVault>(_secrets.Data["ConnectionStrings"].ToString());
Data.Add("ConnectionStrings:CcsSso", connectionStringsSettingsVault.CcsSso);
Expand Down
19 changes: 17 additions & 2 deletions Ccs.Ppg.NotificationService.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Amazon.XRay.Recorder.Core;
using Amazon.XRay.Recorder.Handlers.AwsSdk;
using Ccs.Ppg.NotificationService.API;
using Ccs.Ppg.NotificationService.API.CustomOptions;

Expand Down Expand Up @@ -30,9 +32,22 @@
// Add services to the container.
builder.Services.ConfigureServices(builder.Configuration);

string startupUrl = Environment.GetEnvironmentVariable("STARTUP_URL");
if (!string.IsNullOrWhiteSpace(startupUrl))
{
builder.WebHost.UseUrls(startupUrl);
}

var app = builder.Build();

app.ConfigurePipeline();
if (!string.IsNullOrEmpty(builder.Configuration["EnableXRay"]) && Convert.ToBoolean(builder.Configuration["EnableXRay"]))
{
Console.WriteLine("x-ray is enabled.");
AWSXRayRecorder.InitializeInstance(configuration: builder.Configuration);
app.UseXRay("NotificationApi");
AWSSDKHandler.RegisterXRayForAllServices();
}

app.ConfigurePipeline();

app.Run();
app.Run();
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "notification-service/swagger",
"applicationUrl": "https://localhost:7247;http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
67 changes: 61 additions & 6 deletions Ccs.Ppg.NotificationService.API/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using Ccs.Ppg.Utility.Authorization;
using Ccs.Ppg.NotificationService.Model;
using Ccs.Ppg.Utility.Authorization;
using Ccs.Ppg.Utility.Cache;
using Ccs.Ppg.Utility.Exceptions;
using Ccs.Ppg.Utility.Logging;
using Ccs.Ppg.Utility.Swagger;
using System.Reflection;

namespace Ccs.Ppg.NotificationService.API
{
public static class Startup
{
{
public static void ConfigureServices(this IServiceCollection services, ConfigurationManager config)
{
services.AddCustomLogging();
Expand All @@ -18,6 +20,60 @@ public static void ConfigureServices(this IServiceCollection services, Configura
services.AddServices(config);
services.AddControllers();
services.AddRedis(config);
services.AddSingleton(s =>
{
bool.TryParse(config["IsApiGatewayEnabled"], out bool isApiGatewayEnabled);
bool.TryParse(config["EnableXRay"], out bool enableXray);
bool.TryParse(config["RedisCache:IsEnabled"], out bool redisCacheEnabled);
bool.TryParse(config["NotificationValidationConfigurations:EnableValidation"], out bool validationEnabled);
int.TryParse(config["NotificationValidationConfigurations:SmsMsgLength"], out int smsMsgLength);
int.TryParse(config["NotificationValidationConfigurations:OrgNameLegnth"], out int orgNameLegnth);
int.TryParse(config["NotificationValidationConfigurations:FirstNameLength"], out int firstNameLength);
int.TryParse(config["NotificationValidationConfigurations:LastNameLength"], out int LastNameLength);
ApplicationConfigurationInfo appConfigInfo = new ApplicationConfigurationInfo()
{
IsApiGatewayEnabled = isApiGatewayEnabled,
ApiKey = config["ApiKey"],
OrganisationApiUrl = config["OrganisationApiUrl"],
EnableXRay = enableXray,
RedisCacheSettings = new RedisCacheSettings()
{
IsEnabled = redisCacheEnabled
},
MessageSettings = new MessageSettings()
{
ApiKey = config["Message:ApiKey"],
TemplateId = config["Message:TemplateId"]
},
ConnectionStrings = new ConnectionStrings()
{
CcsSso = config["ConnectionStrings:CcsSso"]
},
EmailSettings = new EmailSettings()
{
ApiKey = config["Email:ApiKey"]
},
WrapperApiSettings = new WrapperApiSettings()
{
ApiGatewayDisabledConfigUrl = config["WrapperApiSettings:ApiGatewayDisabledConfigUrl"],
ApiGatewayEnabledConfigUrl = config["WrapperApiSettings:ApiGatewayEnabledConfigUrl"],
ConfigApiKey = config["WrapperApiSettings:ConfigApiKey"]
},
NotificationValidationConfigurations = new NotificationValidationConfigurations()
{
EnableValidation = validationEnabled,
SmsMsgLength = smsMsgLength,
OrgNameLegnth = orgNameLegnth,
FirstNameLength = firstNameLength,
LastNameLength = LastNameLength,
EmailRegex = config["NotificationValidationConfigurations:EmailRegex"],
LinkRegex = config["NotificationValidationConfigurations:LinkRegex"],
CcsMsg = config["NotificationValidationConfigurations:CcsMsg"],
SignInProviders = config.GetSection("NotificationValidationConfigurations:SignInProviders").Get<List<string>>(),
}
};
return appConfigInfo;
});

// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
services.AddEndpointsApiExplorer();
Expand All @@ -29,10 +85,9 @@ public static void ConfigureServices(this IServiceCollection services, Configura

public static void ConfigurePipeline(this WebApplication app)
{
if (app.Environment.IsDevelopment())
{
app.ConfigureSwagger();
}
app.ConfigureSwagger();

app.UseMiddleware<CommonExceptionHandlerMiddleware>();

app.UseHttpsRedirection();

Expand Down
Loading