Skip to content

Commit 0f4508f

Browse files
Merge pull request #1122 from TechnologyEnhancedLearning/Develop/Fixes/LH-TD-5538-Update-Web.Config-File
Develop/fixes/lh td 5538 update web.config file
2 parents 87111d8 + e983fff commit 0f4508f

File tree

6 files changed

+74
-3
lines changed

6 files changed

+74
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<location path="." inheritInChildApplications="false">
4+
<system.webServer>
5+
<httpProtocol>
6+
<customHeaders>
7+
<remove name="X-Powered-By" />
8+
<remove name="Server" />
9+
</customHeaders>
10+
</httpProtocol>
11+
<security>
12+
<requestFiltering removeServerHeader="true" />
13+
</security>
14+
<handlers>
15+
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
16+
</handlers>
17+
<aspNetCore processPath="dotnet" arguments=".\LearningHub.Nhs.AdminUI.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
18+
</system.webServer>
19+
</location>
20+
</configuration>
21+
<!--ProjectGuid: 1C97A3C2-73E8-4AFF-92EF-F65B4899FADB-->

LearningHub.Nhs.WebUI/Controllers/AccountController.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,16 @@ public IActionResult InvalidUserAccount()
11671167
return this.View();
11681168
}
11691169

1170+
/// <summary>
1171+
/// The user already has an already active session. Then prevent concurrent access to the Learning Hub.
1172+
/// </summary>
1173+
/// <returns>The <see cref="IActionResult"/>.</returns>
1174+
[HttpGet]
1175+
public IActionResult AlreadyAnActiveSession()
1176+
{
1177+
return this.View();
1178+
}
1179+
11701180
/// <summary>
11711181
/// The ForgotPassword.
11721182
/// </summary>

LearningHub.Nhs.WebUI/Services/UserService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,8 +1886,6 @@ public async Task<PagedResultSet<UserHistoryViewModel>> CheckUserHasAnActiveSess
18861886
return userHistoryViewModel;
18871887
}
18881888

1889-
1890-
18911889
/// <summary>
18921890
/// The base 64 m d 5 hash digest.
18931891
/// </summary>

LearningHub.Nhs.WebUI/Views/Account/AlreadyAnActiveSession.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ViewData["Title"] = "Already active session";
2+
ViewData["Title"] = "Session already active";
33
}
44
<div class="bg-white">
55
<div class="nhsuk-width-container app-width-container">

LearningHub.Nhs.WebUI/web.config

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<location path="." inheritInChildApplications="false">
4+
<system.webServer>
5+
<httpProtocol>
6+
<customHeaders>
7+
<remove name="X-Powered-By" />
8+
<remove name="Server" />
9+
</customHeaders>
10+
</httpProtocol>
11+
<security>
12+
<requestFiltering removeServerHeader="true" />
13+
</security>
14+
<handlers>
15+
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
16+
</handlers>
17+
<aspNetCore processPath="dotnet" arguments=".\LearningHub.Nhs.WebUI.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
18+
</system.webServer>
19+
</location>
20+
</configuration>
21+
<!--ProjectGuid: 044CCD77-8B9E-4888-BC20-9FD6E2AFE904-->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<location path="." inheritInChildApplications="false">
4+
<system.webServer>
5+
<httpProtocol>
6+
<customHeaders>
7+
<remove name="X-Powered-By" />
8+
<remove name="Server" />
9+
</customHeaders>
10+
</httpProtocol>
11+
<security>
12+
<requestFiltering removeServerHeader="true" />
13+
</security>
14+
<handlers>
15+
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
16+
</handlers>
17+
<aspNetCore processPath="dotnet" arguments=".\LearningHub.Nhs.Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
18+
</system.webServer>
19+
</location>
20+
</configuration>
21+
<!--ProjectGuid: 21F15E96-314F-4F39-822F-C2568CDC4A5A-->

0 commit comments

Comments
 (0)