Skip to content

Commit 9a88b3f

Browse files
Update continuous-integration-workflow.yml
Reverted the web.config updte scripts from the yml file
1 parent 87111d8 commit 9a88b3f

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,72 +9,10 @@ jobs:
99
runs-on: windows-latest
1010
steps:
1111
- uses: actions/checkout@v3
12-
13-
- name: Modify web.config files in all apps
14-
shell: pwsh
15-
run: |
16-
$webConfigPaths = @(
17-
"${{ github.workspace }}\AdminUI\LearningHub.Nhs.AdminUI\web.config",
18-
"${{ github.workspace }}\WebAPI\LearningHub.Nhs.Api\web.config",
19-
"${{ github.workspace }}\LearningHub.Nhs.WebUI\web.config"
20-
)
21-
22-
foreach ($path in $webConfigPaths) {
23-
if (Test-Path $path) {
24-
Write-Host "Modifying $path"
25-
[xml]$config = Get-Content $path
26-
27-
if (-not $config.configuration.'system.webServer') {
28-
$systemWebServer = $config.CreateElement("system.webServer")
29-
$config.configuration.AppendChild($systemWebServer) | Out-Null
30-
} else {
31-
$systemWebServer = $config.configuration.'system.webServer'
32-
}
33-
34-
if (-not $systemWebServer.httpProtocol) {
35-
$httpProtocol = $config.CreateElement("httpProtocol")
36-
$systemWebServer.AppendChild($httpProtocol) | Out-Null
37-
} else {
38-
$httpProtocol = $systemWebServer.httpProtocol
39-
}
40-
41-
if (-not $httpProtocol.customHeaders) {
42-
$customHeaders = $config.CreateElement("customHeaders")
43-
$httpProtocol.AppendChild($customHeaders) | Out-Null
44-
} else {
45-
$customHeaders = $httpProtocol.customHeaders
46-
}
47-
48-
foreach ($name in @("X-Powered-By", "Server")) {
49-
$removeNode = $config.CreateElement("remove")
50-
$removeNode.SetAttribute("name", $name)
51-
$customHeaders.AppendChild($removeNode) | Out-Null
52-
}
53-
54-
if (-not $systemWebServer.security) {
55-
$security = $config.CreateElement("security")
56-
$systemWebServer.AppendChild($security) | Out-Null
57-
} else {
58-
$security = $systemWebServer.security
59-
}
60-
61-
if (-not $security.requestFiltering) {
62-
$requestFiltering = $config.CreateElement("requestFiltering")
63-
$requestFiltering.SetAttribute("removeServerHeader", "true")
64-
$security.AppendChild($requestFiltering) | Out-Null
65-
}
66-
67-
$config.Save($path)
68-
} else {
69-
Write-Host "File not found: $path"
70-
}
71-
}
72-
7312
- name: Setup .NET Core SDK 8.0
7413
uses: actions/setup-dotnet@v3
7514
with:
7615
dotnet-version: 8.0.x
77-
7816
- name: Add Azure artifact
7917
run: dotnet nuget add source 'https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json' --name 'LearningHubFeed' --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text
8018

0 commit comments

Comments
 (0)